Skip to content

Commit eaedfa0

Browse files
committed
fix: add GPG secrets to validation job for artifact signing
1 parent 12c800d commit eaedfa0

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
name: Validate ${{ matrix.module }}
2828
runs-on: ubuntu-latest
2929
needs: extract-version
30-
30+
env:
31+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }}
3132
strategy:
3233
matrix:
3334
module: [armonik-client, worker]
@@ -43,6 +44,8 @@ jobs:
4344
distribution: temurin
4445
java-version: '17'
4546
cache: maven
47+
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
48+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
4649

4750
- name: Set project version
4851
working-directory: ${{ matrix.module }}
@@ -71,6 +74,10 @@ jobs:
7174
name: Publish ${{ matrix.module }}
7275
runs-on: ubuntu-latest
7376
needs: [extract-version, validate-modules]
77+
env:
78+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }}
79+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
80+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
7481

7582
strategy:
7683
matrix:
@@ -102,10 +109,6 @@ jobs:
102109
- name: Deploy to Sonatype Central
103110
working-directory: ${{ matrix.module }}
104111
run: ./mvnw -B -ntp -Pci-release deploy -DskipTests
105-
env:
106-
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
107-
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
108-
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }}
109112

110113
publish-docker-image:
111114
name: Build and publish Docker image

0 commit comments

Comments
 (0)