Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Commit 37aa134

Browse files
committed
Fix release and test deployment workflows (special case)
1 parent de613b7 commit 37aa134

File tree

2 files changed

+34
-10
lines changed

2 files changed

+34
-10
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,27 @@ jobs:
116116
with: # running setup-java again overwrites the settings.xml
117117
distribution: 'temurin'
118118
java-version: '8'
119-
server-id: ossrh
120-
server-username: MAVEN_CENTRAL_USERNAME
121-
server-password: MAVEN_CENTRAL_TOKEN
122-
gpg-passphrase: MAVEN_GPG_PASSPHRASE
119+
# server-id: ossrh
120+
# server-username: MAVEN_CENTRAL_USERNAME
121+
# server-password: MAVEN_CENTRAL_TOKEN
122+
# gpg-passphrase: MAVEN_GPG_PASSPHRASE
123123
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
124+
# Due to https://github.com/actions/setup-java/issues/85 we can only
125+
# add ONE server using setup-java...
126+
overwrite-settings: false
127+
128+
# ... so let's simply copy a predefined settings.xml file into the m2 folder
129+
# until GH makes it work
130+
- name: Copy predefined settings into home m2 folder
131+
run: |
132+
mkdir -p ~/.m2/
133+
cp .github/workflows/maven/m2-settings-release.xml ~/.m2/settings.xml
124134
125135
- name: Publish to OSSRH
126-
run: mvn -B deploy -Possrh
136+
run: mvn -B deploy -Pxdev-build,ossrh
127137
env:
138+
JFROG_ARTIFACTORY_USERNAME: ${{ secrets.JFROG_ARTIFACTORY_USERNAME }}
139+
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
128140
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
129141
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
130142
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

.github/workflows/test-deploy.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,27 @@ jobs:
1414
with: # running setup-java again overwrites the settings.xml
1515
distribution: 'temurin'
1616
java-version: '8'
17-
server-id: ossrh
18-
server-username: MAVEN_CENTRAL_USERNAME
19-
server-password: MAVEN_CENTRAL_TOKEN
20-
gpg-passphrase: MAVEN_GPG_PASSPHRASE
17+
# server-id: ossrh
18+
# server-username: MAVEN_CENTRAL_USERNAME
19+
# server-password: MAVEN_CENTRAL_TOKEN
20+
# gpg-passphrase: MAVEN_GPG_PASSPHRASE
2121
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
22+
# Due to https://github.com/actions/setup-java/issues/85 we can only
23+
# add ONE server using setup-java...
24+
overwrite-settings: false
25+
26+
# ... so let's simply copy a predefined settings.xml file into the m2 folder
27+
# until GH makes it work
28+
- name: Copy predefined settings into home m2 folder
29+
run: |
30+
mkdir -p ~/.m2/
31+
cp .github/workflows/maven/m2-settings-release.xml ~/.m2/settings.xml
2232
2333
- name: Publish to OSSRH
24-
run: mvn -B deploy -Possrh
34+
run: mvn -B deploy -Pxdev-build,ossrh
2535
env:
36+
JFROG_ARTIFACTORY_USERNAME: ${{ secrets.JFROG_ARTIFACTORY_USERNAME }}
37+
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
2638
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
2739
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
2840
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

0 commit comments

Comments
 (0)