File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1313 runs-on : ubuntu-24.04
1414 permissions :
1515 contents : write
16+ outputs :
17+ new_release_version : ${{ steps.semantic.outputs.new_release_version }}
18+ new_release_published : ${{ steps.semantic.outputs.new_release_published }}
1619 steps :
1720 - uses : actions/checkout@v4
1821 with :
3639 @semantic-release/github
3740
3841 - name : Create a release if needed
42+ id : semantic
3943 run : |
4044 semantic-release
4145 env :
@@ -45,16 +49,24 @@ jobs:
4549 publish :
4650 needs : github_release
4751 runs-on : ubuntu-24.04
52+ if : needs.github_release.outputs.new_release_published == 'true'
4853 name : Publish
4954 steps :
5055 - uses : actions/checkout@v4
56+ with :
57+ ref : main
5158
5259 - name : Install Rust
5360 uses : dtolnay/rust-toolchain@stable
5461
5562 - name : Cache dependencies
5663 uses : Swatinem/rust-cache@v2
5764
65+ - name : Update Cargo.toml version
66+ run : |
67+ echo "Updating to version ${{ needs.github_release.outputs.new_release_version }}"
68+ sed -i "s/^version = .*/version = \"${{ needs.github_release.outputs.new_release_version }}\"/" Cargo.toml
69+
5870 - name : Build
5971 run : cargo build --verbose --release
6072
You can’t perform that action at this time.
0 commit comments