File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Publish JAR to GitHub Pages
2-
32on :
43 push :
54 branches :
65 - main
7-
86jobs :
97 publish-jar :
108 runs-on : ubuntu-latest
11-
129 steps :
1310 - name : Checkout code
1411 uses : actions/checkout@v4
15-
12+
1613 - name : Set up JDK 17
1714 uses : actions/setup-java@v4
1815 with :
1916 java-version : ' 17'
2017 distribution : ' temurin'
21-
18+
2219 - name : Grant execute permission for gradlew
2320 run : chmod +x gradlew
24-
21+
22+ - name : Extract version from build.gradle.kts
23+ id : extract_version
24+ run : |
25+ VERSION=$(./gradlew -q printVersion)
26+ echo "version=$VERSION" >> $GITHUB_OUTPUT
27+ echo "Extracted version: $VERSION"
28+
2529 - name : Publish Maven artifacts to local repo
2630 run : ./gradlew publish
2731 env :
2832 GROUP_ID : fr.sandro642.github
2933 ARTIFACT_ID : ConnectorAPI
30- VERSION : 0.1.0
31-
34+ VERSION : ${{ steps.extract_version.outputs.version }}
35+
3236 - name : Deploy to GitHub Pages
3337 uses : JamesIves/github-pages-deploy-action@v4
3438 with :
You can’t perform that action at this time.
0 commit comments