Skip to content

Commit d01b55d

Browse files
committed
Publish releases and milestones using Central Portal
Closes gh-1262
1 parent 7bc6a6f commit d01b55d

File tree

3 files changed

+26
-21
lines changed

3 files changed

+26
-21
lines changed

.github/actions/sync-to-maven-central/action.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
name: Sync to Maven Central
22
description: Syncs a release to Maven Central and waits for it to be available for use
33
inputs:
4-
jfrog-cli-config-token:
5-
description: 'Config token for the JFrog CLI'
6-
required: true
7-
ossrh-s01-token-username:
8-
description: 'Username for authentication with s01.oss.sonatype.org'
4+
central-token-password:
5+
description: 'Password for authentication with central.sonatype.com'
96
required: true
10-
ossrh-s01-token-password:
11-
description: 'Password for authentication with s01.oss.sonatype.org'
7+
central-token-username:
8+
description: 'Username for authentication with central.sonatype.com'
129
required: true
13-
ossrh-s01-staging-profile:
14-
description: 'Staging profile to use when syncing to Central'
10+
jfrog-cli-config-token:
11+
description: 'Config token for the JFrog CLI'
1512
required: true
1613
spring-graphql-version:
1714
description: 'The version of Spring GraphQL that is being synced to Central'
@@ -27,16 +24,10 @@ runs:
2724
shell: bash
2825
run: jf rt download --spec ${{ format('{0}/artifacts.spec', github.action_path) }} --spec-vars 'buildName=${{ format('spring-graphql-{0}', inputs.spring-graphql-version) }};buildNumber=${{ github.run_number }}'
2926
- name: Sync
30-
uses: spring-io/nexus-sync-action@42477a2230a2f694f9eaa4643fa9e76b99b7ab84 # v0.0.1
27+
uses: spring-io/central-publish-action@0cdd90d12e6876341e82860d951e1bcddc1e51b6 # v0.2.0
3128
with:
32-
username: ${{ inputs.ossrh-s01-token-username }}
33-
password: ${{ inputs.ossrh-s01-token-password }}
34-
staging-profile-name: ${{ inputs.ossrh-s01-staging-profile }}
35-
create: true
36-
upload: true
37-
close: true
38-
release: true
39-
generate-checksums: true
29+
token: ${{ inputs.central-token-password }}
30+
token-name: ${{ inputs.central-token-username }}
4031
- name: Await
4132
uses: ./.github/actions/await-http-resource
4233
with:

.github/workflows/release-milestone.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@ jobs:
3535
/**/spring-graphql-docs-*.zip::zip.name=spring-graphql,zip.type=docs,zip.deployed=false
3636
outputs:
3737
version: ${{ steps.build-and-publish.outputs.version }}
38+
sync-to-maven-central:
39+
name: Sync to Maven Central
40+
needs:
41+
- build-and-stage-release
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Check Out Code
45+
uses: actions/checkout@v4
46+
- name: Sync to Maven Central
47+
uses: ./.github/actions/sync-to-maven-central
48+
with:
49+
central-token-password: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
50+
central-token-username: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
51+
jfrog-cli-config-token: ${{ secrets.JF_ARTIFACTORY_SPRING }}
52+
spring-graphql-version: ${{ needs.build-and-stage-release.outputs.version }}
3853
promote-release:
3954
name: Promote Release
4055
needs:

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ jobs:
4545
- name: Sync to Maven Central
4646
uses: ./.github/actions/sync-to-maven-central
4747
with:
48+
central-token-password: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
49+
central-token-username: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
4850
jfrog-cli-config-token: ${{ secrets.JF_ARTIFACTORY_SPRING }}
49-
ossrh-s01-staging-profile: ${{ secrets.OSSRH_S01_STAGING_PROFILE }}
50-
ossrh-s01-token-password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
51-
ossrh-s01-token-username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
5251
spring-graphql-version: ${{ needs.build-and-stage-release.outputs.version }}
5352
promote-release:
5453
name: Promote Release

0 commit comments

Comments
 (0)