File tree Expand file tree Collapse file tree 2 files changed +69
-0
lines changed
Expand file tree Collapse file tree 2 files changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Create Tag
2+
3+ on :
4+ push :
5+ branches : [master]
6+ paths-ignore :
7+ - ' .github/**'
8+ - ' **/AUTHORS.md'
9+ - ' **/LICENSE'
10+ - ' **/README.md'
11+
12+ jobs :
13+ create-tag :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout Repository
17+ uses : actions/checkout@v4
18+ - name : Get Info
19+ run : |
20+ echo "version=$(grep -Eo '[0-9]+(\.[0-9]+)+' CHANGELOG.md | head -n 1)" >> $GITHUB_OUTPUT
21+ id : info
22+ - name : Create Tag
23+ run : |
24+ git config user.name "$GITHUB_ACTOR"
25+ git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
26+ git tag -a 'v${{ steps.info.outputs.version }}' -m 'Release/v${{ steps.info.outputs.version }}'
27+ git push origin 'v${{ steps.info.outputs.version }}'
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ release :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout Repository
16+ uses : actions/checkout@v4
17+ - name : Install NodeJS
18+ uses : actions/setup-node@v4
19+ with :
20+ node-version : 18
21+ registry-url : ' https://registry.npmjs.org/'
22+ - name : Install dependencies
23+ run : npm install
24+ - name : Build project
25+ run : npm run rollup
26+ - name : Publish to npm
27+ env :
28+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
29+ run : npm publish --access public
30+ - name : Get Info
31+ run : |
32+ echo "version=$(grep -Eo '[0-9]+(\.[0-9]+)+' CHANGELOG.md | head -n 1)" >> $GITHUB_OUTPUT
33+ id : info
34+ - name : Generate Changelog
35+ run : |
36+ awk '/## [0-9]/{p++} p; /## [0-9]/{if (p > 1) exit}' CHANGELOG.md | awk 'NR>2 {print last} {last=$0}' > RELEASE.md
37+ - name : Create Release
38+ uses : ncipollo/release-action@v1
39+ id : create_release
40+ with :
41+ bodyFile : RELEASE.md
42+ tag : v${{ steps.info.outputs.version }}
You can’t perform that action at this time.
0 commit comments