Skip to content

Commit 34bbb39

Browse files
authored
Merge pull request #1616 from stonesmi/maven-publish-fixes
Fix maven publish action
2 parents 4efd414 + 753b41b commit 34bbb39

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

.github/workflows/release-mvn-central.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,24 @@ jobs:
4343
java-package: jdk
4444
distribution: temurin
4545
cache: 'maven'
46-
server-id: ossrh
47-
server-username: CI_DEPLOY_USERNAME
48-
server-password: CI_DEPLOY_PASSWORD
49-
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
50-
gpg-passphrase: MAVEN_GPG_PASSPHRASE
5146

5247
- name: Configure git
53-
run: |
48+
run: |
5449
git config --global committer.email "infra@finos.org"
5550
git config --global committer.name "FINOS Admin"
5651
git config --global author.email "${GITHUB_ACTOR}@users.noreply.github.com"
5752
git config --global author.name "${GITHUB_ACTOR}"
5853
54+
- name: Setup SSH Access for Commit
55+
uses: kielabokkie/ssh-key-and-known-hosts-action@v1.3.0
56+
with:
57+
ssh-private-key: ${{ secrets.COMMIT_SSH_PRIVATE_KEY }}
58+
ssh-host: github.com
59+
60+
- name: Install GPG secret key
61+
run: |
62+
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --yes --always-trust --import
63+
5964
- name: Build with Maven
6065
run: mvn --no-transfer-progress release:prepare release:perform -P sign-it -Dsign=true -s .settings/settings.xml -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
6166
env:

.settings/settings.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,5 @@
55
<username>${env.CI_DEPLOY_USERNAME}</username>
66
<password>${env.CI_DEPLOY_PASSWORD}</password>
77
</server>
8-
<server>
9-
<id>gpg.passphrase</id>
10-
<passphrase>${env.MAVEN_GPG_PASSPHRASE}</passphrase>
11-
</server>
128
</servers>
139
</settings>

0 commit comments

Comments
 (0)