Skip to content

Commit de25de3

Browse files
authored
Merge pull request #10 from bci-oss/add-gpg-key-maven-upload
Add maven central
2 parents 661f7ab + 7bf9b34 commit de25de3

File tree

1 file changed

+6
-26
lines changed

1 file changed

+6
-26
lines changed

.github/workflows/release-workflow.yml

+6-26
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,6 @@ jobs:
1010
name: Check preconditions
1111
runs-on: ubuntu-20.04
1212
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v4
15-
16-
# Required for Maven
17-
- name: Set up JDK 17
18-
uses: actions/setup-java@v4
19-
with:
20-
distribution: 'temurin'
21-
java-version: '17'
22-
overwrite-settings: false
23-
24-
- name: Setup Git
25-
run: |
26-
git config user.name github-actions
27-
git config user.email github-actions@github.com
28-
2913
- name: Sanity check version
3014
if: ${{ !contains( github.event.inputs.release_version, '-M' ) }}
3115
run: |
@@ -55,19 +39,13 @@ jobs:
5539
distribution: 'temurin'
5640
java-version: '17'
5741
server-id: central
58-
server-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
59-
server-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
42+
server-username: MAVEN_CENTRAL_USERNAME
43+
server-password: MAVEN_CENTRAL_PASSWORD
6044
gpg-private-key: ${{ secrets.PGP_KEY }}
45+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
46+
cache: 'maven'
6147
overwrite-settings: false
6248

63-
- name: Cache Maven packages
64-
uses: actions/cache@v4
65-
with:
66-
path: ~/.m2/repository
67-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
68-
restore-keys: |
69-
${{ runner.os }}-maven-
70-
7149
- name: Set versions
7250
continue-on-error: true
7351
run: |
@@ -87,6 +65,8 @@ jobs:
8765
run: mvn -B clean deploy -Psign
8866
env:
8967
MAVEN_GPG_PASSPHRASE: ${{ secrets.PGP_KEY_PASSWORD }}
68+
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
69+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
9070

9171
- name: Commit version changes and push to upstream repository
9272
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5

0 commit comments

Comments
 (0)