Skip to content

Commit 5581157

Browse files
Ship Linux release binaries via GitHub Actions on version tags.
Upload per-architecture tar.xz assets for fyne-cross Linux builds and document pre-built install steps for Ubuntu users who hit CGO build failures.
1 parent 87f6267 commit 5581157

2 files changed

Lines changed: 60 additions & 35 deletions

File tree

.github/workflows/release.yml

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,62 +10,56 @@ permissions:
1010
contents: write
1111

1212
jobs:
13-
package:
13+
package-linux:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
include:
18-
- os: linux
19-
arch: amd64
20-
- os: linux
21-
arch: arm64
22-
- os: windows
23-
arch: amd64
24-
- os: darwin
25-
arch: amd64
26-
- os: darwin
27-
arch: arm64
17+
arch: [amd64, arm64]
2818
steps:
2919
- uses: actions/checkout@v4
3020

3121
- uses: actions/setup-go@v5
3222
with:
33-
go-version: "1.22"
23+
go-version-file: go.mod
3424

3525
- name: Install fyne-cross
3626
run: go install github.com/fyne-io/fyne-cross@latest
3727

38-
- name: Package
39-
run: fyne-cross ${{ matrix.os }} -arch=${{ matrix.arch }} -name git-worktree-manager -release
28+
- name: Package Linux
29+
run: fyne-cross linux -arch=${{ matrix.arch }} -name git-worktree-manager -release --pull
4030

41-
- name: Upload artifact
42-
uses: actions/upload-artifact@v4
31+
- name: Prepare release asset
32+
run: |
33+
VERSION="${GITHUB_REF_NAME}"
34+
mkdir -p release-assets
35+
SRC="fyne-cross/dist/linux-${{ matrix.arch }}"
36+
TARBALL="$SRC/git-worktree-manager.tar.xz"
37+
if [[ ! -f "$TARBALL" ]]; then
38+
echo "Expected tarball not found in $SRC:"
39+
ls -laR fyne-cross/dist || true
40+
exit 1
41+
fi
42+
cp "$TARBALL" "release-assets/git-worktree-manager-${VERSION}-linux-${{ matrix.arch }}.tar.xz"
43+
44+
- uses: actions/upload-artifact@v4
4345
with:
44-
name: ${{ matrix.os }}-${{ matrix.arch }}
45-
path: fyne-cross/dist/${{ matrix.os }}-${{ matrix.arch }}/
46+
name: linux-${{ matrix.arch }}
47+
path: release-assets/
4648

4749
release:
48-
needs: package
50+
needs: package-linux
4951
runs-on: ubuntu-latest
5052
if: startsWith(github.ref, 'refs/tags/v')
5153
steps:
5254
- uses: actions/download-artifact@v4
5355
with:
5456
path: artifacts
57+
merge-multiple: true
5558

56-
- name: Create release archives
57-
run: |
58-
mkdir -p release
59-
find artifacts -type f | while read -r f; do
60-
base=$(basename "$f")
61-
dir=$(dirname "$f" | xargs basename)
62-
case "$base" in
63-
*.tar.xz|*.zip|*.exe) cp "$f" "release/${dir}-${base}" ;;
64-
*) cp -a "$f" "release/${dir}-$(basename "$f")" ;;
65-
esac
66-
done
67-
cd release && zip -r ../git-worktree-manager-packages.zip .
59+
- name: List release assets
60+
run: find artifacts -type f -ls
6861

6962
- uses: softprops/action-gh-release@v2
7063
with:
71-
files: git-worktree-manager-packages.zip
64+
generate_release_notes: true
65+
files: artifacts/*

README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,35 @@ Repository: [github.com/jigarthacker24/git-worktree-manager](https://github.com/
2727
- `git` in your PATH
2828
- On macOS: Cursor at `/Applications/Cursor.app` or `cursor` in PATH
2929

30-
## Install (after publishing to GitHub)
30+
## Install
31+
32+
### macOS (build from source via Fyne)
3133

3234
```bash
3335
go install fyne.io/tools/cmd/fyne@latest
3436
fyne install github.com/jigarthacker24/git-worktree-manager@latest
3537
```
3638

39+
### Linux (pre-built binary — recommended)
40+
41+
`fyne install` builds from source on Linux and can fail on Ubuntu with a `_FORTIFY_SOURCE` CGO error. Use the pre-built release instead:
42+
43+
```bash
44+
VERSION=v1.0.0
45+
ARCH=amd64 # use arm64 on Apple Silicon Linux / aarch64 machines
46+
47+
curl -LO "https://github.com/jigarthacker24/git-worktree-manager/releases/download/${VERSION}/git-worktree-manager-${VERSION}-linux-${ARCH}.tar.xz"
48+
sudo tar -xJf "git-worktree-manager-${VERSION}-linux-${ARCH}.tar.xz" -C /
49+
```
50+
51+
Then launch **Git Worktree Manager** from your app menu, or run:
52+
53+
```bash
54+
git-worktree-manager
55+
```
56+
57+
See [Releases](https://github.com/jigarthacker24/git-worktree-manager/releases) for all versions and architectures.
58+
3759
## Run from source
3860

3961
```bash
@@ -108,7 +130,16 @@ git tag v1.0.0
108130
git push origin v1.0.0
109131
```
110132

111-
The workflow in `.github/workflows/release.yml` uploads platform packages to the GitHub release.
133+
The workflow in `.github/workflows/release.yml` uploads Linux `.tar.xz` packages to the GitHub release.
134+
135+
### Linux install troubleshooting (source builds)
136+
137+
If you build from source with `fyne install` or `go run .`, you may need:
138+
139+
```bash
140+
sudo apt install gcc libgl1-mesa-dev xorg-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxxf86vm-dev
141+
CGO_CFLAGS="-U_FORTIFY_SOURCE" fyne install github.com/jigarthacker24/git-worktree-manager@latest
142+
```
112143

113144
## List on [apps.fyne.io](https://apps.fyne.io)
114145

0 commit comments

Comments
 (0)