@@ -35,37 +35,10 @@ jobs:
3535 next-release-version : ${{ steps.get-next-release.outputs.next-release-version }}
3636 next-release-git-tag : ${{ steps.get-next-release.outputs.next-release-git-tag }}
3737 next-release-notes : ${{ steps.get-next-release.outputs.next-release-notes }}
38- prepare-commit :
39- needs : get-next-release
40- if : needs.get-next-release.outputs.next-release-published == 'true'
41- runs-on : ubuntu-latest
42- permissions :
43- contents : write
44- steps :
45- - name : Checkout repository
46- uses : actions/checkout@v4
47- - name : Bump Cargo.toml version
48- run : |
49- sed -i 's/"version": "[0-9]\+\.[0-9]\+\.[0-9]\+"/"version": "${{ needs.get-next-release.outputs.next-release-version }}"/' src-tauri/tauri.conf.json
50- - name : Prepare commit changes
51- id : current-commit
52- run : |
53- git config user.name "github-actions"
54- git config user.email "github-actions@github.com"
55- git add src-tauri/tauri.conf.json
56- git commit -m "Bump version [skip ci]"
57- git push --dry-run
58- echo "last-commit-sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
59- - name : Show last commit SHA
60- run : |
61- echo "Last commit SHA: ${{ steps.current-commit.outputs.last-commit-sha }}"
62- outputs :
63- last-commit-sha : ${{ steps.current-commit.outputs.last-commit-sha }}
6438
6539 build :
6640 needs :
6741 - get-next-release
68- - prepare-commit
6942 if : needs.get-next-release.outputs.next-release-published == 'true'
7043 permissions :
7144 contents : write
8558 steps :
8659 - name : Checkout repository
8760 uses : actions/checkout@v4
88- with :
89- ref : ${{ needs.prepare-commit.outputs.last-commit-sha }}
9061
9162 - name : Rust setup
9263 uses : dtolnay/rust-toolchain@stable
@@ -117,6 +88,16 @@ jobs:
11788 # If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
11889 run : npm install # Change this to npm, yarn or pnpm.
11990
91+ - name : Bump tauri.config.json version
92+ run : npm run bump-tauri-version ${{ needs.get-next-release.outputs.next-release-version }}
93+ - name : Push commit
94+ run : |
95+ git config user.name "github-actions"
96+ git config user.email "github-actions@github.com"
97+ git add src-tauri/tauri.conf.json
98+ git commit -m "Bump version [skip ci]"
99+ git push --dry-run
100+
120101 - name : Build the app
121102 id : tauri-action
122103 uses : tauri-apps/tauri-action@v0.4.3
@@ -133,13 +114,20 @@ jobs:
133114 args : ${{ matrix.args }}
134115
135116 push-changes :
136- needs : build
117+ needs :
118+ - get-next-release
119+ - build
137120 if : success()
138121 runs-on : ubuntu-latest
139122 steps :
140123 - name : Checkout repository
141124 uses : actions/checkout@v4
142- with :
143- ref : ${{ needs.prepare-commit.outputs.last-commit-sha }}
144- - name : Push commit changes
145- run : git push
125+ - name : Bump tauri.config.json version
126+ run : npm run bump-tauri-version ${{ needs.get-next-release.outputs.next-release-version }}
127+ - name : Push commit
128+ run : |
129+ git config user.name "github-actions"
130+ git config user.email "github-actions@github.com"
131+ git add src-tauri/tauri.conf.json
132+ git commit -m "Bump version [skip ci]"
133+ git push
0 commit comments