Skip to content

Fix release GH script (attempt #N+2) #6

Fix release GH script (attempt #N+2)

Fix release GH script (attempt #N+2) #6

Workflow file for this run

name: Release new version
on:
workflow_dispatch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: maven
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # has to be read directly from secrets
gpg-passphrase: MAVEN_GPG_PASSPHRASE # default name used by maven-gpg-plugin
- name: Release new version
run: mvn -Dmaven.test.skip=true -Darguments=-DskipTests -ntp -B release:clean release:prepare release:perform -P release
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}