File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed
Expand file tree Collapse file tree 2 files changed +56
-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 : Get Info
18+ run : |
19+ echo "version=$(grep -Eo '[0-9]+(\.[0-9]+)+' CHANGELOG.md | head -n 1)" >> $GITHUB_OUTPUT
20+ id : info
21+ - name : Generate Changelog
22+ run : |
23+ awk 'BEGIN {found=0} /^## [0-9]/ {if (!found) {found=1; next} else exit} found {print}' CHANGELOG.md > RELEASE.md
24+ - name : Create Release
25+ uses : ncipollo/release-action@v1
26+ id : create_release
27+ with :
28+ bodyFile : RELEASE.md
29+ tag : v${{ steps.info.outputs.version }}
You can’t perform that action at this time.
0 commit comments