Skip to content

Commit 55271be

Browse files
committed
fix: missing release files for linux
1 parent 2b41ae4 commit 55271be

2 files changed

Lines changed: 83 additions & 17 deletions

File tree

.github/workflows/release-plugin.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ jobs:
4949
name: linux-artifact
5050
path: bin/plugins/
5151

52-
build-darwin-arm64:
53-
name: Build (macOS arm64)
52+
build-darwin:
53+
name: Build (macOS universal)
5454
runs-on: macos-latest
5555
outputs:
5656
plugin: ${{ steps.meta.outputs.plugin }}
@@ -78,6 +78,24 @@ jobs:
7878
go build -trimpath -buildvcs=false -ldflags="-w -s" \
7979
-o bin/plugins/${PLUGIN}-darwin-arm64 ./plugins/${PLUGIN}
8080
81+
- name: Build plugin (amd64)
82+
run: |
83+
PLUGIN="${{ steps.meta.outputs.plugin }}"
84+
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 \
85+
CGO_CFLAGS="-mmacosx-version-min=10.15" \
86+
CGO_LDFLAGS="-mmacosx-version-min=10.15" \
87+
go build -trimpath -buildvcs=false -ldflags="-w -s" \
88+
-o bin/plugins/${PLUGIN}-darwin-amd64 ./plugins/${PLUGIN}
89+
90+
- name: Create universal plugin binary
91+
run: |
92+
PLUGIN="${{ steps.meta.outputs.plugin }}"
93+
lipo -create \
94+
-output bin/plugins/${PLUGIN}-darwin-universal \
95+
bin/plugins/${PLUGIN}-darwin-arm64 \
96+
bin/plugins/${PLUGIN}-darwin-amd64
97+
rm bin/plugins/${PLUGIN}-darwin-arm64 bin/plugins/${PLUGIN}-darwin-amd64
98+
8199
- uses: actions/upload-artifact@v4
82100
with:
83101
name: darwin-artifact
@@ -120,7 +138,7 @@ jobs:
120138
release:
121139
name: Create Release
122140
runs-on: ubuntu-latest
123-
needs: [build-linux, build-darwin-arm64, build-windows]
141+
needs: [build-linux, build-darwin, build-windows]
124142
steps:
125143
- uses: actions/download-artifact@v4
126144
with:

.github/workflows/release.yml

Lines changed: 62 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install system dependencies
2727
run: |
2828
sudo apt-get update
29-
sudo apt-get install -y gcc libgtk-3-dev libwebkit2gtk-4.1-dev
29+
sudo apt-get install -y gcc libgtk-3-dev libwebkit2gtk-4.1-dev rpm
3030
3131
- name: Install wails3 CLI
3232
run: go install github.com/wailsapp/wails/v3/cmd/wails3@latest
@@ -44,17 +44,40 @@ jobs:
4444
-ldflags="-w -s -X github.com/felixdotgo/querybox/pkg/version.Version=${{ github.ref_name }}" \
4545
-o bin/querybox .
4646
47-
- name: Package
47+
- name: Package tar.gz
4848
run: |
4949
mkdir -p staging/bin/plugins
5050
cp bin/querybox staging/
5151
cp bin/plugins/* staging/bin/plugins/
5252
tar -czf querybox-linux-amd64.tar.gz -C staging .
5353
54+
- name: Package .deb
55+
run: |
56+
APP_VERSION="${{ github.ref_name }}"
57+
APP_VERSION="${APP_VERSION#v}"
58+
APP_VERSION="$APP_VERSION" GOARCH=amd64 wails3 tool package \
59+
-name querybox -format deb \
60+
-config ./build/linux/nfpm/nfpm.yaml \
61+
-out ./bin
62+
cp bin/querybox_*.deb querybox-linux-amd64.deb
63+
64+
- name: Package .rpm
65+
run: |
66+
APP_VERSION="${{ github.ref_name }}"
67+
APP_VERSION="${APP_VERSION#v}"
68+
APP_VERSION="$APP_VERSION" GOARCH=amd64 wails3 tool package \
69+
-name querybox -format rpm \
70+
-config ./build/linux/nfpm/nfpm.yaml \
71+
-out ./bin
72+
cp bin/querybox-*.rpm querybox-linux-amd64.rpm
73+
5474
- uses: actions/upload-artifact@v4
5575
with:
5676
name: linux-artifact
57-
path: querybox-linux-amd64.tar.gz
77+
path: |
78+
querybox-linux-amd64.tar.gz
79+
querybox-linux-amd64.deb
80+
querybox-linux-amd64.rpm
5881
5982
build-darwin:
6083
name: Build (macOS)
@@ -76,18 +99,41 @@ jobs:
7699
- name: Build frontend
77100
run: cd frontend && npm ci && npm run build
78101

79-
- name: Build plugins
80-
run: bash scripts/build-plugins.sh
81-
82-
- name: Build binary
102+
- name: Build binary (arm64)
83103
run: |
84104
CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 \
85105
CGO_CFLAGS="-mmacosx-version-min=10.15" \
86106
CGO_LDFLAGS="-mmacosx-version-min=10.15" \
87107
MACOSX_DEPLOYMENT_TARGET=10.15 \
88108
go build -tags production -trimpath -buildvcs=false \
89109
-ldflags="-w -s -X github.com/felixdotgo/querybox/pkg/version.Version=${{ github.ref_name }}" \
90-
-o bin/querybox .
110+
-o bin/querybox-arm64 .
111+
112+
- name: Build binary (amd64)
113+
run: |
114+
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 \
115+
CGO_CFLAGS="-mmacosx-version-min=10.15" \
116+
CGO_LDFLAGS="-mmacosx-version-min=10.15" \
117+
MACOSX_DEPLOYMENT_TARGET=10.15 \
118+
go build -tags production -trimpath -buildvcs=false \
119+
-ldflags="-w -s -X github.com/felixdotgo/querybox/pkg/version.Version=${{ github.ref_name }}" \
120+
-o bin/querybox-amd64 .
121+
122+
- name: Create universal binary
123+
run: lipo -create -output bin/querybox bin/querybox-arm64 bin/querybox-amd64
124+
125+
- name: Build plugins (universal)
126+
run: |
127+
GOOS=darwin GOARCH=arm64 bash scripts/build-plugins.sh
128+
mkdir -p bin/plugins-arm64 && cp bin/plugins/* bin/plugins-arm64/
129+
GOOS=darwin GOARCH=amd64 bash scripts/build-plugins.sh
130+
mkdir -p bin/plugins-amd64 && cp bin/plugins/* bin/plugins-amd64/
131+
rm -rf bin/plugins && mkdir -p bin/plugins
132+
for f in bin/plugins-arm64/*; do
133+
name=$(basename "$f")
134+
lipo -create -output "bin/plugins/$name" \
135+
"bin/plugins-arm64/$name" "bin/plugins-amd64/$name"
136+
done
91137
92138
- name: Create .app bundle
93139
run: |
@@ -101,12 +147,12 @@ jobs:
101147
codesign --force --deep --sign - bin/querybox.app
102148
103149
- name: Package
104-
run: cd bin && zip -r ../querybox-darwin-arm64.zip querybox.app
150+
run: cd bin && zip -r ../querybox-darwin-universal.zip querybox.app
105151

106152
- uses: actions/upload-artifact@v4
107153
with:
108154
name: darwin-artifact
109-
path: querybox-darwin-arm64.zip
155+
path: querybox-darwin-universal.zip
110156

111157
build-windows:
112158
name: Build (Windows)
@@ -168,12 +214,12 @@ jobs:
168214
169215
- name: Stage installer
170216
shell: pwsh
171-
run: Copy-Item bin\querybox-amd64-installer.exe querybox-amd64-installer.exe
217+
run: Copy-Item bin\querybox-amd64-installer.exe querybox-windows-amd64-installer.exe
172218

173219
- uses: actions/upload-artifact@v4
174220
with:
175221
name: windows-artifact
176-
path: querybox-amd64-installer.exe
222+
path: querybox-windows-amd64-installer.exe
177223

178224
release:
179225
name: Create Release
@@ -190,7 +236,9 @@ jobs:
190236
generate_release_notes: true
191237
files: |
192238
querybox-linux-amd64.tar.gz
193-
querybox-darwin-arm64.zip
194-
querybox-amd64-installer.exe
239+
querybox-linux-amd64.deb
240+
querybox-linux-amd64.rpm
241+
querybox-darwin-universal.zip
242+
querybox-windows-amd64-installer.exe
195243
env:
196244
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)