File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ name : 🔖 Auto release gh action
2+
3+ on :
4+ workflow_dispatch :
5+ schedule :
6+ - cron : ' 0 0 * * 0'
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Check out code
13+ uses : actions/checkout@v3
14+ with :
15+ fetch-depth : 0
16+
17+ - name : Get Commit Count
18+ id : get_commit
19+ run : git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count | xargs -I {} echo COMMIT_COUNT={} >> $GITHUB_OUTPUT
20+
21+ - name : Create release and tag
22+ if : ${{ steps.get_commit.outputs.COMMIT_COUNT > 0 }}
23+ id : tag_version
24+ uses :
mathieudutour/[email protected] 25+ with :
26+ github_token : ${{ secrets.GITHUB_TOKEN }}
27+
28+ - name : Create a GitHub release
29+ if : ${{ steps.get_commit.outputs.COMMIT_COUNT > 0 }}
30+ uses : actions/create-release@v1
31+ env :
32+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33+ with :
34+ tag_name : ${{ steps.tag_version.outputs.new_tag }}
35+ release_name : Release ${{ steps.tag_version.outputs.new_tag }}
36+ body : ${{ steps.tag_version.outputs.changelog }}
You can’t perform that action at this time.
0 commit comments