Skip to content

Commit 395642f

Browse files
phildenhoffclaude
andauthored
fix(release): open version bump PR after the build (#116)
peter-evans/create-pull-request resets the working tree to the base branch after creating the PR branch, which stripped the applied version bump before tauri-action ran. The Ubuntu job therefore built and uploaded artifacts (and latest.json) with the previous version under the new release tag. Moving the step after the build keeps the version bump in the tree while artifacts are produced. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 2b73c3a commit 395642f

1 file changed

Lines changed: 24 additions & 21 deletions

File tree

.github/workflows/release.yml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -149,27 +149,6 @@ jobs:
149149
150150
perl -0pi -e "s/^version = \"[^\"]+\"/version = \"$VERSION\"/m" src-tauri/Cargo.toml
151151
152-
- name: Open version bump pull request
153-
if: github.event_name == 'workflow_dispatch' && matrix.platform == 'ubuntu-22.04' && steps.version.outputs.release_type != 'nightly'
154-
uses: peter-evans/create-pull-request@v7
155-
with:
156-
token: ${{ secrets.CITADEL_RELEASE_TOKEN }}
157-
commit-message: "chore(release): bump version to v${{ steps.version.outputs.version }}"
158-
branch: chore/release-bump-v${{ steps.version.outputs.version }}
159-
delete-branch: true
160-
title: "chore(release): bump version to v${{ steps.version.outputs.version }}"
161-
body: |
162-
Automated release version bump generated by the Release workflow.
163-
164-
Files updated:
165-
- package.json
166-
- src-tauri/Cargo.toml
167-
- src-tauri/tauri.conf.json
168-
add-paths: |
169-
package.json
170-
src-tauri/Cargo.toml
171-
src-tauri/tauri.conf.json
172-
173152
- uses: oven-sh/setup-bun@v1
174153
with:
175154
bun-version: latest
@@ -245,3 +224,27 @@ jobs:
245224
Includes updater metadata (`latest.json`) for Tauri updater clients.
246225
prerelease: ${{ steps.version.outputs.prerelease == 'true' }}
247226
generateReleaseNotes: true
227+
228+
# Must run after the build: create-pull-request resets the working tree
229+
# to the base branch, which would strip the applied version bump and
230+
# produce artifacts built with the old version.
231+
- name: Open version bump pull request
232+
if: github.event_name == 'workflow_dispatch' && matrix.platform == 'ubuntu-22.04' && steps.version.outputs.release_type != 'nightly'
233+
uses: peter-evans/create-pull-request@v7
234+
with:
235+
token: ${{ secrets.CITADEL_RELEASE_TOKEN }}
236+
commit-message: "chore(release): bump version to v${{ steps.version.outputs.version }}"
237+
branch: chore/release-bump-v${{ steps.version.outputs.version }}
238+
delete-branch: true
239+
title: "chore(release): bump version to v${{ steps.version.outputs.version }}"
240+
body: |
241+
Automated release version bump generated by the Release workflow.
242+
243+
Files updated:
244+
- package.json
245+
- src-tauri/Cargo.toml
246+
- src-tauri/tauri.conf.json
247+
add-paths: |
248+
package.json
249+
src-tauri/Cargo.toml
250+
src-tauri/tauri.conf.json

0 commit comments

Comments
 (0)