Skip to content

Commit

Permalink
release on github actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Jan 22, 2024
1 parent 3fef9d9 commit 97ebd0a
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
name: build cli for all platforms

on:
release:
types: [created]
push:
tags:
- '*'

permissions:
contents: write
packages: write

jobs:
releases-matrix:
name: Release Go Binary
make-release:
runs-on: ubuntu-latest
steps:
- uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
build-all-for-all:
runs-on: ubuntu-latest
needs:
- make-release
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
name: ["send", "show"]
goos: [linux, freebsd, darwin, windows]
goarch: [amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1
- uses: wangyoucao577/go-release-action@v1.40
with:
project_path: cmd/git-str
binary_name: git-str
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: "./src/apps/${{ matrix.name }}"
binary_name: "git-${{ matrix.name }}-nostr"
extra_files: LICENSE README.md
overwrite: true
md5sum: false
sha256sum: false
compress_assets: true

0 comments on commit 97ebd0a

Please sign in to comment.