Skip to content

tag release

tag release #37

Workflow file for this run

name: tag release
on: workflow_dispatch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin' #Eclipse Temurin
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} #signer=bc
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
run: mvn --no-transfer-progress --batch-mode -Pdeploy clean deploy
- name: Extract version
id: mvnVer
run: echo "version=$(mvn help:evaluate -DforceStdout -Dexpression=project.version -q)" >>$GITHUB_OUTPUT
outputs:
version: ${{ steps.mvnVer.outputs.version }}
release:
needs: deploy
runs-on: ubuntu-latest
if: "!endsWith(needs.build.deploy.version, '-SNAPSHOT')"
steps:
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ver: ${{ needs.deploy.outputs.version }}
run: gh release create "v$ver" --repo="$GITHUB_REPOSITORY" --target="${{ github.ref_name }}" --title="v$ver" --generate-notes