File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ # YES, YOU CAN COPY-PASTE THIS ACTION AND IT SHOULD WORK
2+ # keep in mind, that it won't trigger other actions because it's using action permissions.
3+ # You can: use a PAT token or a workflow_call to trigger another action
4+ on :
5+ push :
6+ branches :
7+ - main
8+
9+ jobs :
10+ bump :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : write
14+ actions : write
15+ steps :
16+ - uses : actions/checkout@v5
17+ with :
18+ fetch-depth : 0
19+ fetch-tags : true
20+ - name : Set up git config
21+ run : |
22+ git config --global user.name "github-actions[bot]"
23+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
24+ - uses : actions/setup-cz@main
25+ - id : bump-version
26+ run : |
27+ cz bump --yes --annotated-tag
28+ git push --follow-tags
29+ current_version="$(cz version -p --current)" # ATTENTION: You may have to add the v* at the beginning of the version
30+ echo "current_version=$current_version" >> $GITHUB_OUTPUT
31+ - name : Build changelog for Release
32+ env :
33+ CURRENT_VERSION : ${{ steps.bump-version.outputs.current_version }}
34+ run : |
35+ cz changelog --dry-run "${CURRENT_VERSION}" > .changelog.md
36+ - name : Release
37+ uses : softprops/action-gh-release@v2
38+ with :
39+ body_path : " .changelog.md"
40+ tag_name : ${{ steps.bump-version.outputs.current_version }}
41+ env :
42+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments