Skip to content

Commit 15f17e4

Browse files
dakomclaude
andcommitted
fix: strip version from tauri artifact filenames
Build with tauri-action but skip its release upload, then rename artifacts to remove the version (e.g. WAVS_aarch64.dmg instead of WAVS_0.0.1_aarch64.dmg) and upload to the main release. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 23ac536 commit 15f17e4

1 file changed

Lines changed: 25 additions & 6 deletions

File tree

.github/workflows/tauri.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,33 @@ jobs:
4343
- name: Install frontend dependencies
4444
run: cd app && pnpm install
4545

46-
- uses: tauri-apps/tauri-action@v0
46+
- name: Build Tauri app
47+
id: tauri-build
48+
uses: tauri-apps/tauri-action@v0
4749
env:
4850
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4951
with:
5052
projectPath: "./app"
51-
tagName: ${{ github.ref_name }}
52-
releaseName: ${{ github.ref_name }}
53-
releaseBody: "See the assets to download this version and install."
54-
releaseDraft: false
55-
prerelease: false
53+
includeRelease: false
5654
args: ${{ matrix.args }}
55+
56+
- name: Upload artifacts to release
57+
shell: bash
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
run: |
61+
TAG="${{ github.ref_name }}"
62+
ARTIFACTS='${{ steps.tauri-build.outputs.artifactPaths }}'
63+
64+
for artifact in $(echo "$ARTIFACTS" | jq -r '.[]'); do
65+
if [ ! -f "$artifact" ]; then
66+
continue
67+
fi
68+
69+
filename=$(basename "$artifact")
70+
# Strip version from filename: WAVS_0.0.1_aarch64.dmg -> WAVS_aarch64.dmg
71+
renamed=$(echo "$filename" | sed -E 's/_[0-9]+\.[0-9]+\.[0-9]+//')
72+
73+
cp "$artifact" "/tmp/$renamed"
74+
gh release upload "$TAG" "/tmp/$renamed" --repo "${{ github.repository }}" --clobber
75+
done

0 commit comments

Comments
 (0)