Removed gpg for release on github #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: Publish package to the Maven Central Repository | ||
on: | ||
- workflow_dispatch | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Maven Central Repository | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
- id: install-secret-key | ||
name: Install gpg secret key | ||
run: | | ||
# Install gpg secret key | ||
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import | ||
# Verify gpg secret key | ||
gpg --list-secret-keys --keyid-format LONG | ||
- id: publish-to-central | ||
name: Publish to Central Repository | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
run: | | ||
mvn \ | ||
-e -X \ | ||
--no-transfer-progress \ | ||
--batch-mode \ | ||
# -Possrh \ | ||
-DskipTests \ | ||
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \ | ||
clean deploy |