File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change 11name : Release
22
33on :
4- workflow_run :
5- workflows :
6- - CI
7- types :
8- - completed
4+ push :
95 branches :
106 - main
117 - master
8+ workflow_dispatch :
129
1310permissions :
1411 contents : write
1512
1613concurrency :
17- group : release-${{ github.event.workflow_run.head_branch }}
14+ group : release-${{ github.ref_name }}
1815 cancel-in-progress : true
1916
2017jobs :
2118 build-and-publish :
22- if : github.event.workflow_run.conclusion == 'success'
2319 runs-on : windows-latest
2420
2521 steps :
26- - name : Checkout successful CI commit
22+ - name : Checkout release commit
2723 uses : actions/checkout@v4
2824 with :
29- ref : ${{ github.event.workflow_run.head_sha }}
3025 fetch-depth : 0
3126
3227 - name : Install stable toolchain
3732 - name : Cache cargo
3833 uses : Swatinem/rust-cache@v2
3934
35+ - name : Format check
36+ run : cargo fmt --all --check
37+
38+ - name : Clippy
39+ run : cargo clippy --all-targets --all-features -- -D warnings
40+
41+ - name : Test
42+ run : cargo test --all-targets --all-features
43+
4044 - name : Read version metadata
4145 id : version
4246 shell : powershell
5559 run : |
5660 git config user.name "github-actions[bot]"
5761 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
58- git tag -f "${{ steps.version.outputs.tag }}" "${{ github.event.workflow_run.head_sha }}"
62+ git tag -f "${{ steps.version.outputs.tag }}" "${{ github.sha }}"
5963 git push origin "refs/tags/${{ steps.version.outputs.tag }}" --force
6064
6165 - name : Build release
8892 uses : softprops/action-gh-release@v2
8993 with :
9094 tag_name : ${{ steps.version.outputs.tag }}
91- target_commitish : ${{ github.event.workflow_run.head_sha }}
95+ target_commitish : ${{ github.sha }}
9296 files : |
9397 dist/*.zip
9498 dist/*.sha256
You can’t perform that action at this time.
0 commit comments