Skip to content

Deploy Snapshot

Deploy Snapshot #16

Workflow file for this run

name: Deploy Snapshot
on:
workflow_dispatch:
branches:
- 'master'
-
jobs:
deploy:
name: Deploy Snapshot
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: 'main'
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
- name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish to Maven Central repository
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: |
cat ~/.m2/settings.xml
echo $MAVEN_USERNAME
echo $MAVEN_PASSWORD
mvn \
--no-transfer-progress \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_PASSPHRASE }} \
clean deploy