File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,16 +2,32 @@ name: Release Rust Binaries
22
33on :
44 push :
5- tags :
6- - ' v* '
5+ branches :
6+ - main
77 workflow_dispatch :
88
99permissions :
1010 contents : write
1111
1212jobs :
13+ bump_version :
14+ name : Bump Version and Tag
15+ runs-on : ubuntu-latest
16+ outputs :
17+ new_tag : ${{ steps.tag_version.outputs.new_tag }}
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - name : Bump version and push tag
22+ id : tag_version
23+ uses : mathieudutour/github-tag-action@v6.2
24+ with :
25+ github_token : ${{ secrets.GITHUB_TOKEN }}
26+ default_bump : patch
27+
1328 build :
1429 name : Build on ${{ matrix.os }}
30+ needs : bump_version
1531 runs-on : ${{ matrix.os }}
1632 strategy :
1733 matrix :
4763 run : cp target/release/${{ matrix.artifact_name }} ${{ matrix.asset_name }}
4864
4965 - name : Upload to Release
50- if : startsWith(github.ref, 'refs/tags/')
5166 uses : softprops/action-gh-release@v2
5267 with :
68+ tag_name : ${{ needs.bump_version.outputs.new_tag }}
5369 files : ${{ matrix.asset_name }}
You can’t perform that action at this time.
0 commit comments