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 : Manual Release
2+
3+ on :
4+ workflow_dispatch :
5+
6+ permissions :
7+ contents : write
8+
9+ jobs :
10+ release :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v4
15+
16+ - name : Set up JDK 21
17+ uses : actions/setup-java@v4
18+ with :
19+ java-version : " 21"
20+ distribution : " temurin"
21+
22+ - name : Setup Gradle
23+ uses : gradle/actions/setup-gradle@v4
24+ with :
25+ gradle-version : " 8.9"
26+
27+ - name : Get version from gradle.properties
28+ id : project_version
29+ run : echo "version=$(grep '^version=' gradle.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT
30+
31+ - name : Package artifacts
32+ run : gradle package
33+
34+ - name : Delete existing tag if exists
35+ run : |
36+ VERSION=${{ steps.project_version.outputs.version }}
37+ git tag -d "v${VERSION}" 2>/dev/null || true
38+ git push origin ":refs/tags/v${VERSION}" 2>/dev/null || true
39+ continue-on-error : true
40+
41+ - name : Create and push tag
42+ run : |
43+ VERSION=${{ steps.project_version.outputs.version }}
44+ git config --local user.email "action@github.com"
45+ git config --local user.name "GitHub Action"
46+ git tag "v${VERSION}"
47+ git push origin "v${VERSION}"
48+
49+ - name : Release
50+ uses : softprops/action-gh-release@v2
51+ with :
52+ tag_name : v${{ steps.project_version.outputs.version }}
53+ name : v${{ steps.project_version.outputs.version }}
54+ draft : false
55+ generate_release_notes : true
56+ prerelease : false
57+ files : outputs/*.jar
You can’t perform that action at this time.
0 commit comments