File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Create Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ release :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : write
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Extract version from tag
17+ id : version
18+ run : echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
19+
20+ - name : Extract changelog for this version
21+ id : changelog
22+ run : |
23+ VERSION="${{ steps.version.outputs.VERSION }}"
24+ # Extract the section for this version from CHANGELOG.md
25+ awk "/## \[${VERSION}\]/,/## \[/" CHANGELOG.md | sed '/## \['"${VERSION}"'\]/d; /## \[/d' > release_notes.md
26+
27+ - name : Create Release
28+ uses : softprops/action-gh-release@v1
29+ with :
30+ name : Release v${{ steps.version.outputs.VERSION }}
31+ body_path : release_notes.md
32+ draft : false
33+ prerelease : false
34+ env :
35+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments