Skip to content

Commit

Permalink
Migrate release process to GitHub Actions
Browse files Browse the repository at this point in the history
Complete migration to GitHub Actions.

See gh-411
  • Loading branch information
philwebb committed Jun 5, 2024
1 parent d92f210 commit 1f5b9c2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .github/artifacts.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"files": [
{
"aql": {
"items.find": {
"$and": [
{
"@build.name": "${buildName}",
"@build.number": "${buildNumber}"
}
]
}
},
"target": "nexus/"
}
]
}
24 changes: 22 additions & 2 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,25 @@ jobs:
name: Promote
runs-on: ubuntu-latest
steps:
- name: Promote
run: echo "Promote happens here"
- name: Check Out
uses: actions/checkout@v4
- name: Set Up JFrog CLI
uses: jfrog/setup-jfrog-cli@7c95feb32008765e1b4e626b078dfd897c4340ad # v4.1.2
env:
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
- name: Download Release Artifacts
shell: bash
run: jf rt download --spec ./.github/artifacts.spec --spec-vars 'buildName=${{ format('spring-javaformat-{0}', inputs.version) }};buildNumber=${{ inputs.build-number }}'
- name: Check Maven Central Sync Status
id: check-sync-status
run: |
url=${{ format('https://repo.maven.apache.org/maven2/io/spring/javaformat/spring-javaformat/{0}/spring-javaformat-{0}.pom', inputs.version) }}
status_code=$( curl --write-out '%{http_code}' --head --silent --output /dev/null ${url} )
if [ "${status_code}" != 200 ] && [ "${status_code}" != 404 ]; then
echo "Unexpected status code ${status_code}"
exit 1
fi
echo "status-code=${status_code}" >> $GITHUB_OUTPUT
- name: Sync to Maven Central
run: echo "Sync Here"
if: ${{ steps.check-sync-status.outputs.status-code == '404' }}

0 comments on commit 1f5b9c2

Please sign in to comment.