Skip to content

Commit 6ffe046

Browse files
gnoviawanclaude
andauthored
fix: inject version from git tag into package.json during CD build (#4)
Add "Set version from tag" step to both Windows and Linux build jobs that runs `npm version` with the git tag before electron-builder runs. This ensures artifact names match the release version instead of the hardcoded package.json version. Co-authored-by: Claude <noreply@anthropic.com>
1 parent f226764 commit 6ffe046

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ jobs:
6363
- name: Install dependencies
6464
run: bun install --frozen-lockfile
6565

66+
- name: Set version from tag
67+
run: npm version ${{ github.ref_name }} --no-git-tag-version --allow-same-version
68+
6669
- name: Build Windows
6770
run: bun run build:win
6871

@@ -98,6 +101,9 @@ jobs:
98101
- name: Install dependencies
99102
run: bun install --frozen-lockfile
100103

104+
- name: Set version from tag
105+
run: npm version ${{ github.ref_name }} --no-git-tag-version --allow-same-version
106+
101107
- name: Build Linux
102108
run: bun run build:linux
103109

0 commit comments

Comments
 (0)