Skip to content

Commit

Permalink
setup signing in a separate step so cleanup works (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
kortemik authored May 16, 2024
1 parent b103aa4 commit a9f3c83
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/upload_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Upload Release

on:
release:
types: published
types: [published]

jobs:
upload:
Expand All @@ -18,15 +18,20 @@ jobs:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

- name: Setup GitHub Packages
- name: Setup Signing
uses: actions/setup-java@v2
with:
java-version: 8.0.292+10
distribution: 'adopt'

gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Setup GitHub Packages
uses: actions/setup-java@v2
with:
java-version: 8.0.292+10
distribution: 'adopt'

- name: Publish to GitHub Packages
run: mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= clean deploy -Ppublish-github-packages
env:
Expand All @@ -44,13 +49,10 @@ jobs:
server-username: CENTRAL_SONATYPE_ORG_USERNAME
server-password: CENTRAL_SONATYPE_ORG_PASSWORD

gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Publish to Maven Central
run: mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= clean deploy -Ppublish-maven-central
env:
CENTRAL_SONATYPE_ORG_USERNAME: ${{ secrets.CENTRAL_SONATYPE_ORG_USERNAME }}
CENTRAL_SONATYPE_ORG_PASSWORD: ${{ secrets.CENTRAL_SONATYPE_ORG_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

0 comments on commit a9f3c83

Please sign in to comment.