Add await-http-resource
action
#1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Release (Milestone or GA) to Maven Central from Artifactory Build | ||
on: | ||
workflow_call: | ||
inputs: | ||
buildName: | ||
description: 'The Artifactory Build Name' | ||
required: true | ||
type: string | ||
buildNumber: | ||
description: 'The Artifactory Build Number' | ||
required: true | ||
type: string | ||
runner: | ||
description: 'The runner for job' | ||
required: false | ||
type: string | ||
default: ubuntu-latest | ||
secrets: | ||
OSSRH_S01_TOKEN_USERNAME: | ||
required: true | ||
OSSRH_S01_TOKEN_PASSWORD: | ||
required: true | ||
OSSRH_STAGING_PROFILE_NAME: | ||
required: true | ||
JF_ARTIFACTORY_SPRING: | ||
required: true | ||
env: | ||
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} | ||
WORKFLOWS_REF: main | ||
jobs: | ||
deploy-to-maven-central: | ||
runs-on: ${{ inputs.runner }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: spring-io/spring-github-workflows | ||
show-progress: false | ||
ref: ${{ env.WORKFLOWS_REF }} | ||
- uses: jfrog/setup-jfrog-cli@v4 | ||
- name: Download Release Files | ||
id: download-release-files | ||
run: | | ||
jfrog rt download \ | ||
--spec utils/release-files-spec.json \ | ||
--spec-vars "buildname=${{ inputs.buildName }};buildnumber=${{ inputs.buildNumber }}" | ||
jarToCheck=$(find nexus -name "*.jar" -print -quit) | ||
jarToCheck=${jarToCheck#nexus} | ||
echo jarToCheck=$jarToCheck >> $GITHUB_OUTPUT | ||
- uses: spring-io/[email protected] | ||
id: nexus | ||
with: | ||
username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }} | ||
password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }} | ||
staging-profile-name: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }} | ||
create: true | ||
upload: true | ||
generate-checksums: true | ||
upload-parallel: 10 | ||
close: true | ||
release: true | ||
close-timeout: 3600 | ||
release-timeout: 3600 | ||
- name: Await for Artifact in Maven Central Repository | ||
uses: ./.github/actions/await-http-resource | ||
with: | ||
url: 'https://repo.maven.apache.org/maven2'${{ steps.download-release-files.outputs.jarToCheck }} |