diff --git a/.github/workflows/ci-snapshot.yml b/.github/workflows/ci-snapshot.yml index a281580..fb065e6 100644 --- a/.github/workflows/ci-snapshot.yml +++ b/.github/workflows/ci-snapshot.yml @@ -40,7 +40,7 @@ jobs: --server-id-resolve repo.spring.io \ --server-id-deploy repo.spring.io \ --repo-resolve snapshot \ - --repo-deploy snapshot + --repo-deploy libs-snapshot-local echo JFROG_CLI_BUILD_NAME=${{ github.event.repository.name }}-${{ github.ref_name }} >> $GITHUB_ENV echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV diff --git a/.github/workflows/promote-ga-to-central.yml b/.github/workflows/promote-ga-to-central.yml new file mode 100644 index 0000000..68209f9 --- /dev/null +++ b/.github/workflows/promote-ga-to-central.yml @@ -0,0 +1,56 @@ +name: Promote Staged GA to Central + +on: + workflow_dispatch: + inputs: + buildName: + description: 'The Artifactory Build Name' + required: true + buildNumber: + description: 'The Artifactory Build' + required: true + +jobs: + staging: + runs-on: ubuntu-latest + if: github.repository_owner == 'spring-projects' + steps: + + - uses: actions/checkout@v3 + with: + token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} + + - uses: jfrog/setup-jfrog-cli@v3 + with: + version: 2.50.2 + env: + JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} + + - name: Promote Build + run: | + jfrog rt build-promote ${{ inputs.buildName }} ${{ inputs.buildNumber }} libs-release-local + + # Download released files + - name: Download Release Files + run: | + jfrog rt download \ + --spec .github/release-files-spec.json \ + --spec-vars "buildname=${{ inputs.buildName }};buildnumber=${{ inputs.buildNumber }}" + + # Create checksums, signatures and create staging repo on central and upload + - uses: jvalkeal/nexus-sync@v0.0.2 + id: nexus + with: + url: ${{ secrets.OSSRH_URL }} + 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 + pgp-sign: true + upload-parallel: 10 + pgp-sign-passphrase: ${{ secrets.GPG_PASSPHRASE }} + pgp-sign-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + close: true + release: true \ No newline at end of file diff --git a/.github/workflows/promote-milestone.yml b/.github/workflows/promote-milestone.yml new file mode 100644 index 0000000..c748b74 --- /dev/null +++ b/.github/workflows/promote-milestone.yml @@ -0,0 +1,27 @@ +name: Promote Staged Milestone + +on: + workflow_dispatch: + inputs: + buildName: + description: 'The Artifactory Build Name' + required: true + buildNumber: + description: 'The Artifactory Build' + required: true + +jobs: + staging: + runs-on: ubuntu-latest + if: github.repository_owner == 'spring-projects' + steps: + + - uses: jfrog/setup-jfrog-cli@v3 + with: + version: 2.50.2 + env: + JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} + + - name: Promote Build + run: | + jfrog rt build-promote ${{ inputs.buildName }} ${{ inputs.buildNumber }} libs-milestone-local \ No newline at end of file diff --git a/.github/workflows/release-staging.yml b/.github/workflows/release-staging.yml index e241009..260a23b 100644 --- a/.github/workflows/release-staging.yml +++ b/.github/workflows/release-staging.yml @@ -68,3 +68,8 @@ jobs: sed -i "s/version=.*/version=${{ inputs.nextDevelopmentVersion }}/" gradle.properties git commit -a -m "[artifactory-release] Next development version" git push origin + + - name: Print Build Info + run: | + echo "::notice ::Artifactory Build Name=$JFROG_CLI_BUILD_NAME" + echo "::notice ::Artifactory Build Number=$JFROG_CLI_BUILD_NUMBER" \ No newline at end of file