Skip to content

Commit

Permalink
Try without the action
Browse files Browse the repository at this point in the history
  • Loading branch information
hamnis committed Sep 26, 2024
1 parent c4faef6 commit 1d9c97a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
9 changes: 4 additions & 5 deletions .github/release-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
<gpg.executable>gpg</gpg.executable>
</properties>
</profile>
</profiles>
<servers>
<server>
<id>${env.SERVER_ID}</id>
<username>${env.SERVER_USERNAME}</username>
<password>${env.SERVER_PASSWORD}</password>
<id>sonatype</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
</servers>
</settings>
28 changes: 17 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,21 @@ jobs:
- name: set version
run: |
mvn versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
mvn versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
- name: Release Maven package
uses: WasiqB/maven-publish-action@v2
with:
settings_path: .github/release-settings.xml
server_id: sonatype
maven_profiles: release
gpg_private_key: ${{ secrets.PGP_SECRET }}
gpg_passphrase: ${{ secrets.PGP_PASSPHRASE }}
server_username: ${{ secrets.SONATYPE_USERNAME }}
server_password: ${{ secrets.SONATYPE_PASSWORD }}
- name: Import signing key
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
run: |
echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
- name: Deploy release
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
run: |
mvn -Prelease --settings .github/release-settings.xml --batch-mode clean deploy

0 comments on commit 1d9c97a

Please sign in to comment.