File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Release from Merged PR
2+
3+ on :
4+ pull_request :
5+ types : [closed]
6+ branches : [main]
7+
8+ jobs :
9+ create-release :
10+ if : github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Extract version from pom.xml
18+ id : extract_version
19+ run : |
20+ VERSION=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='version']/text()" pom.xml)
21+ echo "VERSION=$VERSION"
22+ echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
23+
24+ - name : Create GitHub Release with provenance
25+ uses : softprops/action-gh-release@v2
26+ with :
27+ tag_name : v${{ steps.extract_version.outputs.VERSION }}
28+ name : Release v${{ steps.extract_version.outputs.VERSION }}
29+ generate_release_notes : false
30+ draft : false
31+ prerelease : false
32+ token : ${{ secrets.GITHUB_TOKEN }}
33+ env :
34+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments