Skip to content

Commit df39ae6

Browse files
authored
Merge pull request #31 from polyapi/develop
Added GPG key.
2 parents 47bad81 + c5b3db8 commit df39ae6

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/maven-publish.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,25 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v4
18+
1819
- name: Set up JDK 17
1920
uses: actions/setup-java@v3
2021
with:
2122
java-version: '17'
2223
distribution: 'temurin'
23-
server-id: github
24+
cache: 'maven'
25+
server-id: ossrh
26+
server-username: OSSRH_USERNAME
27+
server-password: OSSRH_PASSWORD
28+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2429
settings-path: ${{ github.workspace }}
2530

26-
- uses: s4u/[email protected]
27-
with:
28-
servers: '[{"id": "ossrh", "username": "${{ secrets.DISTRIBUTION_REPOSITORY_RELEASE_USERNAME }}", "password": "${{ secrets.DISTRIBUTION_REPOSITORY_RELEASE_PASSWORD }}"}]'
29-
3031
- uses: webfactory/[email protected]
3132
with:
3233
ssh-private-key: ${{ secrets.TAG_SSH_KEY }}
3334

3435
- name: Release to production
35-
run: mvn clean release:clean release:prepare release:perform -B -DaltDeploymentRepository=ossrh::https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ -Darguments="-Ddevelop.api.key=${{ secrets.DEVELOP_SERVER_API_KEY }} -Dprod.na1.api.key=${{ secrets.PROD_EU1_SERVER_API_KEY }} -Dprod.eu1.api.key=${{ secrets.PROD_NA1_SERVER_API_KEY }}" -P release
36+
run: mvn clean release:clean release:prepare release:perform -B -DaltDeploymentRepository=ossrh::https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ -Darguments="-Ddevelop.api.key=${{ secrets.DEVELOP_SERVER_API_KEY }} -Dprod.na1.api.key=${{ secrets.PROD_EU1_SERVER_API_KEY }} -Dprod.eu1.api.key=${{ secrets.PROD_NA1_SERVER_API_KEY }}" -P release
37+
env:
38+
OSSRH_USERNAME: ${{ secrets.DISTRIBUTION_REPOSITORY_RELEASE_USERNAME }}
39+
OSSRH_PASSWORD: ${{ secrets.DISTRIBUTION_REPOSITORY_RELEASE_PASSWORD }}

0 commit comments

Comments
 (0)