diff --git a/.github/artifacts.spec b/.github/artifacts.spec new file mode 100644 index 00000000..67d191c0 --- /dev/null +++ b/.github/artifacts.spec @@ -0,0 +1,17 @@ +{ + "files": [ + { + "aql": { + "items.find": { + "$and": [ + { + "@build.name": "${buildName}", + "@build.number": "${buildNumber}", + } + ] + } + }, + "target": "nexus/" + } + ] +} diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index 968b265f..984b4513 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -33,5 +33,14 @@ jobs: name: Promote runs-on: ubuntu-latest steps: - - name: Promote - run: echo "Promote happens here" + - name: Set Up JFrog CLI + uses: jfrog/setup-jfrog-cli@727b480bafd0d8adbdfdb2257a7d7c2e08eb1779 # v4.0.2 + env: + JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} + - name: Download Release Artifacts + shell: bash + run: jf rt download --spec .gitub/artifacts.spec --spec-vars 'buildName=${{ format('spring-javaformat-{0}', inputs.version) }};buildNumber=${{ inputs.build-number }}' + - name: Check Sync Status + run: | + url=${{ format('https://repo.maven.apache.org/maven2/io/spring/javaformat/spring-javaformat/{0}/spring-javaformat-{}.pom', inputs.version) }} + curl --fail --head --silent $url > /dev/null