Attach standalone JAR to releases #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build JAR | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| cache: maven | |
| - name: Build | |
| run: mvn --batch-mode clean package | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: java-254-client | |
| path: target/java-254-client-*.jar | |
| - name: Name release JAR | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: cp target/java-254-client-*.jar "java-254-client-${GITHUB_REF_NAME}.jar" | |
| - name: Create GitHub release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh release create "$GITHUB_REF_NAME" "java-254-client-${GITHUB_REF_NAME}.jar" --verify-tag --generate-notes |