Browse Source

Publish releases using Central Portal

Closes gh-46012
3.3.x
Andy Wilkinson 6 months ago
parent
commit
8681b9445b
  1. 27
      .github/actions/sync-to-maven-central/action.yml
  2. 5
      .github/workflows/release.yml

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

@ -1,17 +1,14 @@
name: Sync to Maven Central name: Sync to Maven Central
description: 'Syncs a release to Maven Central and waits for it to be available for use' description: 'Syncs a release to Maven Central and waits for it to be available for use'
inputs: inputs:
jfrog-cli-config-token: central-token-password:
description: 'Config token for the JFrog CLI' description: 'Password for authentication with central.sonatype.com'
required: true
ossrh-s01-staging-profile:
description: 'Staging profile to use when syncing to Central'
required: true required: true
ossrh-s01-token-password: central-token-username:
description: 'Password for authentication with s01.oss.sonatype.org' description: 'Username for authentication with central.sonatype.com'
required: true required: true
ossrh-s01-token-username: jfrog-cli-config-token:
description: 'Username for authentication with s01.oss.sonatype.org' description: 'Config token for the JFrog CLI'
required: true required: true
spring-boot-version: spring-boot-version:
description: 'Version of Spring Boot that is being synced to Central' description: 'Version of Spring Boot that is being synced to Central'
@ -27,16 +24,10 @@ runs:
shell: bash shell: bash
run: jf rt download --spec ${{ format('{0}/artifacts.spec', github.action_path) }} --spec-vars 'buildName=${{ format('spring-boot-{0}', inputs.spring-boot-version) }};buildNumber=${{ github.run_number }}' run: jf rt download --spec ${{ format('{0}/artifacts.spec', github.action_path) }} --spec-vars 'buildName=${{ format('spring-boot-{0}', inputs.spring-boot-version) }};buildNumber=${{ github.run_number }}'
- name: Sync - name: Sync
uses: spring-io/nexus-sync-action@42477a2230a2f694f9eaa4643fa9e76b99b7ab84 # v0.0.1 uses: spring-io/central-publish-action@0cdd90d12e6876341e82860d951e1bcddc1e51b6 # v0.2.0
with: with:
close: true token: ${{ inputs.central-token-password }}
create: true token-name: ${{ inputs.central-token-username }}
generate-checksums: true
password: ${{ inputs.ossrh-s01-token-password }}
release: true
staging-profile-name: ${{ inputs.ossrh-s01-staging-profile }}
upload: true
username: ${{ inputs.ossrh-s01-token-username }}
- name: Await - name: Await
uses: ./.github/actions/await-http-resource uses: ./.github/actions/await-http-resource
with: with:

5
.github/workflows/release.yml

@ -72,10 +72,9 @@ jobs:
- name: Sync to Maven Central - name: Sync to Maven Central
uses: ./.github/actions/sync-to-maven-central uses: ./.github/actions/sync-to-maven-central
with: with:
central-token-password: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
central-token-username: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
jfrog-cli-config-token: ${{ secrets.JF_ARTIFACTORY_SPRING }} jfrog-cli-config-token: ${{ secrets.JF_ARTIFACTORY_SPRING }}
ossrh-s01-staging-profile: ${{ secrets.OSSRH_S01_STAGING_PROFILE }}
ossrh-s01-token-password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
ossrh-s01-token-username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
spring-boot-version: ${{ needs.build-and-stage-release.outputs.version }} spring-boot-version: ${{ needs.build-and-stage-release.outputs.version }}
promote-release: promote-release:
name: Promote Release name: Promote Release

Loading…
Cancel
Save