Skip to content

Commit

Permalink
Setup private key in gihub action
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Khouzam <[email protected]>
  • Loading branch information
MatthewKhouzam committed Mar 11, 2024
1 parent 5e6751d commit f8f7822
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,28 @@ jobs:
packages: write

steps:
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.ORG_GPG_PRIVATE_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- uses: actions/checkout@v4
- name: Set up Java for publishing to Maven Central Snapshot Repository
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-passphrase: PASSPHRASE
- name: Make a snapshot
run: mvn -Pdeploy -Pproduction --no-transfer-progress --batch-mode clean deploy -U
env:
MAVEN_USERNAME: ${{ secrets.ORG_OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }}
PASSPHRASE: ${{ secrets.ORG_GPG_PASSPHRASE }}
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
Expand Down

0 comments on commit f8f7822

Please sign in to comment.