Skip to content

Commit e488dbd

Browse files
Upgrade release workflow to v3 (#909)
* Upgrade release workflow to v3 * Fix after review
1 parent 0ca64ef commit e488dbd

File tree

2 files changed

+43
-6
lines changed

2 files changed

+43
-6
lines changed

.cirrus.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ build_task:
4646
#allow deployment of pull request artifacts to repox
4747
DEPLOY_PULL_REQUEST: true
4848
CIRRUS_CLONE_DEPTH: 50
49+
SIGN_KEY: ENCRYPTED[!cc216dfe592f79db8006f2a591f8f98b40aa2b078e92025623594976fd32f6864c1e6b6ba74b50647f608e2418e6c336!]
50+
PGP_PASSPHRASE: ENCRYPTED[!314a8fc344f45e462dd5e8dccd741d7562283a825e78ebca27d4ae9db8e65ce618e7f6aece386b2782a5abe5171467bd!]
4951
maven_cache:
5052
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
5153
build_script:

.github/workflows/release.yml

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,9 @@ jobs:
2323
slack_channel: lang-python
2424
env:
2525
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
26-
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
27-
BINTRAY_TOKEN: ${{ secrets.BINTRAY_TOKEN }}
2826
BURGRX_USER: ${{ secrets.BURGRX_USER }}
2927
BURGRX_PASSWORD: ${{ secrets.BURGRX_PASSWORD }}
30-
CENTRAL_USER: ${{ secrets.CENTRAL_USER }}
31-
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
3228
CIRRUS_TOKEN: ${{ secrets.CIRRUS_TOKEN }}
33-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3429
PATH_PREFIX: ${{ secrets.BINARIES_PATH_PREFIX }}
3530
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
3631
RELEASE_SSH_USER: ${{ secrets.RELEASE_SSH_USER }}
@@ -44,4 +39,44 @@ jobs:
4439
run: |
4540
echo "${{ steps.lt_release.outputs.releasability }}"
4641
echo "${{ steps.lt_release.outputs.release }}"
47-
42+
maven-central-sync:
43+
runs-on: ubuntu-latest
44+
needs:
45+
- sonar_release
46+
steps:
47+
- name: Setup JFrog CLI
48+
uses: jfrog/setup-jfrog-cli@v1
49+
- name: JFrog config
50+
run: jfrog rt config repox --url https://repox.jfrog.io/artifactory/ --apikey $ARTIFACTORY_API_KEY --basic-auth-only
51+
env:
52+
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
53+
- name: Get the version
54+
id: get_version
55+
run: |
56+
IFS=. read major minor patch build <<< "${{ github.event.release.tag_name }}"
57+
echo ::set-output name=build::"${build}"
58+
- name: Create local repository directory
59+
id: local_repo
60+
run: echo ::set-output name=dir::"$(mktemp -d repo.XXXXXXXX)"
61+
- name: Download Artifacts
62+
uses: SonarSource/gh-action_release/download-build@v3
63+
with:
64+
build-number: ${{ steps.get_version.outputs.build }}
65+
local-repo-dir: ${{ steps.local_repo.outputs.dir }}
66+
- name: Maven Central Sync
67+
id: maven-central-sync
68+
continue-on-error: true
69+
uses: SonarSource/gh-action_release/maven-central-sync@v3
70+
with:
71+
local-repo-dir: ${{ steps.local_repo.outputs.dir }}
72+
env:
73+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
74+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
75+
- name: Notify on failure
76+
if: ${{ failure() || steps.maven-central-sync.outcome == 'failure' }}
77+
uses: 8398a7/action-slack@v3
78+
with:
79+
status: failure
80+
fields: repo,author,eventName
81+
env:
82+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_BUILD_WEBHOOK }}

0 commit comments

Comments
 (0)