Skip to content

production

production #9

Workflow file for this run

name: Deploy
on: deployment
jobs:
build:
if: github.event.deployment.environment == 'production'
name: Deploy to maven central
runs-on: ubuntu-latest
env:
MAVEN_GPG_SIGN_KEY: '${{ secrets.MAVEN_GPG_SIGN_KEY }}'
username: '${{ secrets.maven_deploy_username }}'
password: '${{ secrets.maven_deploy_password }}'
passphrase: '${{ secrets.gpg_passphrase }}'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: setup
run: |
echo -e "$MAVEN_GPG_SIGN_KEY" | gpg --batch --import -
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys $gpgkey
rm -rf $HOME/.m2/settings.xml
echo -e "<settings>\n<servers>\n<server>\n<id>ossrh</id>\n<username>$username</username>\n<password>$password</password>\n</server>\n</servers>\n</settings>" > $HOME/.m2/settings.xml
- name: Deploy
run: |
mvn clean deploy -Dgpg.passphrase=$passphrase