Skip to content

~ use release profile, use GPG secrets #3

~ use release profile, use GPG secrets

~ use release profile, use GPG secrets #3

Workflow file for this run

name: Maven Publish
on:
release:
types: [created]
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: '11'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Install GPG secret key
- run: |
# Install gpg secret key
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import

Check failure on line 22 in .github/workflows/maven-publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/maven-publish.yml

Invalid workflow file

You have an error in your yaml syntax on line 22
# Verify gpg secret key
gpg --list-secret-keys --keyid-format LONG
- name: Publish package
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} clean deploy -P release
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}