File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed
Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ name: release
22
33on :
44 push :
5- # Sequence of patterns matched against refs/tags
5+ branches :
6+ - main
67 tags :
78 - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
89
@@ -14,8 +15,27 @@ permissions:
1415 contents : write
1516
1617jobs :
18+ version :
19+ name : Generate Version
20+ runs-on : ubuntu-latest
21+ outputs :
22+ version : ${{ steps.version.outputs.version }}
23+ steps :
24+ - uses : actions/checkout@v4
25+ with :
26+ fetch-depth : 0
27+
28+ - name : Generate Version
29+ id : version
30+ uses :
mathieudutour/[email protected] 31+ with :
32+ github_token : ${{ secrets.GITHUB_TOKEN }}
33+ default_bump : patch
34+ release_branches : main
35+
1736 build :
1837 name : Build
38+ needs : version
1939 runs-on : ${{ matrix.os }}
2040 strategy :
2141 matrix :
86106
87107 release :
88108 name : Create Release
89- needs : build
109+ needs : [ build, version]
90110 runs-on : ubuntu-latest
91- if : startsWith(github.ref, 'refs/tags/')
111+ if : startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
92112
93113 steps :
94114 - name : Download all artifacts
97117 - name : Create Release
98118 uses : softprops/action-gh-release@v1
99119 with :
120+ tag_name : v${{ needs.version.outputs.version }}
121+ name : Release v${{ needs.version.outputs.version }}
100122 files : |
101123 popcorn-cli-linux.tar.gz/popcorn-cli-linux.tar.gz
102124 popcorn-cli-windows.zip/popcorn-cli-windows.zip
You can’t perform that action at this time.
0 commit comments