Skip to content

Commit 10a30f7

Browse files
committed
feat(ci): create Windows .nsis.zip + Linux .AppImage.tar.gz updater archives
tauri-action only creates .app.tar.gz for macOS. Windows and Linux updater archives must be created manually: - Windows: zip each NSIS setup.exe as .nsis.zip - Linux: tar.gz each .AppImage These are uploaded before the signing step, which then downloads, signs, and uploads .sig files for all platforms. The latest.json manifest already handles these patterns.
1 parent 30904ac commit 10a30f7

5 files changed

Lines changed: 41 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,42 @@ jobs:
163163
includeUpdaterJson: true
164164
args: ${{ matrix.args }}
165165

166+
# Create updater archives for Windows and Linux.
167+
# tauri-action only creates .app.tar.gz for macOS. Windows and
168+
# Linux updater archives must be built manually.
169+
- name: Create updater archives (Windows)
170+
if: runner.os == 'Windows' && steps.tag.outputs.name != ''
171+
shell: bash
172+
env:
173+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
174+
run: |
175+
TAG="${{ steps.tag.outputs.name }}"
176+
REPO="${{ github.repository }}"
177+
# Find all NSIS setup executables
178+
find src-tauri/target -name "*-setup.exe" -path "*/bundle/nsis/*" | while read EXE; do
179+
BASE=$(basename "$EXE" .exe)
180+
ZIP_NAME="${BASE}.nsis.zip"
181+
echo "Creating: $ZIP_NAME from $EXE"
182+
(cd "$(dirname "$EXE")" && powershell -Command "Compress-Archive -Path '$(basename "$EXE")' -DestinationPath '$ZIP_NAME' -Force")
183+
gh release upload "$TAG" "$(dirname "$EXE")/$ZIP_NAME" --repo "$REPO" --clobber
184+
done
185+
186+
- name: Create updater archives (Linux)
187+
if: runner.os == 'Linux' && steps.tag.outputs.name != ''
188+
shell: bash
189+
env:
190+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
191+
run: |
192+
TAG="${{ steps.tag.outputs.name }}"
193+
REPO="${{ github.repository }}"
194+
# Find all AppImage files
195+
find src-tauri/target -name "*.AppImage" -path "*/bundle/appimage/*" | while read AI; do
196+
TAR_NAME="$(basename "$AI").tar.gz"
197+
echo "Creating: $TAR_NAME from $AI"
198+
tar czf "/tmp/$TAR_NAME" -C "$(dirname "$AI")" "$(basename "$AI")"
199+
gh release upload "$TAG" "/tmp/$TAR_NAME" --repo "$REPO" --clobber
200+
done
201+
166202
# Sign updater archives. tauri-action renames files during upload
167203
# (e.g. SwitchHosts.app.tar.gz → SwitchHosts_aarch64.app.tar.gz),
168204
# so we download the UPLOADED archives from the release, sign them,

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"version": "5.0.0-beta.15",
3+
"version": "5.0.0-beta.16",
44
"scripts": {
55
"start": "cross-env NODE_ENV=development electron ./build/main.js",
66
"pretest": "rimraf ./test/tmp",

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "SwitchHosts",
4-
"version": "5.0.0-beta.15",
4+
"version": "5.0.0-beta.16",
55
"identifier": "net.oldj.switchhosts",
66
"build": {
77
"beforeDevCommand": "npm run dev:renderer",

src/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"5.0.0-beta.15"
1+
"5.0.0-beta.16"

0 commit comments

Comments
 (0)