File tree Expand file tree Collapse file tree 1 file changed +9
-50
lines changed Expand file tree Collapse file tree 1 file changed +9
-50
lines changed Original file line number Diff line number Diff line change 11name : Release
22
33on :
4- workflow_dispatch :
5- inputs :
6- version_type :
7- description : ' Type of version bump (patch, minor, major)'
8- required : true
9- default : ' patch'
10-
11- env :
12- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4+ push :
5+ branches :
6+ - main
137
148jobs :
15- release :
9+ release-please :
1610 runs-on : ubuntu-latest
1711 steps :
18- - name : Checkout code
19- uses : actions/checkout@v4
20- with :
21- fetch-depth : 0 # Required for conventional-changelog
22-
23- - name : Setup Node.js
24- uses : actions/setup-node@v4
25- with :
26- node-version : ' 20'
27-
12+ - uses : actions/checkout@v4
2813 - name : Install dependencies
2914 run : npm install
30-
31- - name : Configure Git
32- run : |
33- git config user.name "github-actions[bot]"
34- git config user.email "github-actions[bot]@users.noreply.github.com"
35-
36- - name : Bump version and create tag
37- id : bump_version
38- run : |
39- npm version ${{ github.event.inputs.version_type }} -m "Release: v%s"
40- echo "NEW_VERSION=$(node -p \"require('./package.json').version\")" >> $GITHUB_OUTPUT
41-
42- - name : Generate Changelog
43- run : |
44- npx conventional-changelog -p angular -i CHANGELOG.md -s -r 0
45- git add CHANGELOG.md
46-
47- - name : Commit and Push changes
48- run : |
49- git commit -m "docs: update CHANGELOG.md for v${{ steps.bump_version.outputs.NEW_VERSION }}"
50- git push
51- git push --tags
52-
53- - name : Create GitHub Release
54- uses : softprops/action-gh-release@v2
15+ -
uses :
google-github-actions/[email protected] 16+ id : release
5517 with :
56- tag_name : v${{ steps.bump_version.outputs.NEW_VERSION }}
57- name : Release v${{ steps.bump_version.outputs.NEW_VERSION }}
58- body_path : CHANGELOG.md
59- prerelease : false
60- draft : false
18+ release-type : node
19+ package-name : repo-description
You can’t perform that action at this time.
0 commit comments