Deploy Snapshot #16
This file contains 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: 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 |