Ship Linux release binaries via GitHub Actions on version tags. #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| package-linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: [amd64, arm64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install fyne-cross | |
| run: go install github.com/fyne-io/fyne-cross@latest | |
| - name: Package Linux | |
| run: fyne-cross linux -arch=${{ matrix.arch }} -name git-worktree-manager -release --pull | |
| - name: Prepare release asset | |
| run: | | |
| VERSION="${GITHUB_REF_NAME}" | |
| mkdir -p release-assets | |
| SRC="fyne-cross/dist/linux-${{ matrix.arch }}" | |
| TARBALL="$SRC/git-worktree-manager.tar.xz" | |
| if [[ ! -f "$TARBALL" ]]; then | |
| echo "Expected tarball not found in $SRC:" | |
| ls -laR fyne-cross/dist || true | |
| exit 1 | |
| fi | |
| cp "$TARBALL" "release-assets/git-worktree-manager-${VERSION}-linux-${{ matrix.arch }}.tar.xz" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-${{ matrix.arch }} | |
| path: release-assets/ | |
| release: | |
| needs: package-linux | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: List release assets | |
| run: find artifacts -type f -ls | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: artifacts/* |