Update release script: properly compute release version (drop v pre…
#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: Release | |
| on: | |
| push: | |
| tags: ["v*"] | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out | |
| with: | |
| persist-credentials: false | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| distribution: temurin | |
| - name: Setup Gradle and run build | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-disabled: "true" | |
| - name: Publish | |
| env: | |
| GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} | |
| GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} | |
| SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
| SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }} | |
| run: ./gradlew assemble publishToSonatype closeAndReleaseSonatypeStagingRepository | |
| - name: Compute release version | |
| run: | | |
| echo "RELEASE_VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV | |
| - name: Attach agent jar | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: agent/build/libs/agent-${{ env.RELEASE_VERSION }}.jar |