Skip to content

Commit

Permalink
Fix release v3 workflow (#2607)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomverin authored Apr 29, 2021
1 parent 82828fe commit c83f838
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ build_task:
SONAR_HOST_URL: https://next.sonarqube.com/sonarqube
#allow deployment of pull request artifacts to repox
DEPLOY_PULL_REQUEST: true
#sign artifacts
SIGN_KEY: ENCRYPTED[!cc216dfe592f79db8006f2a591f8f98b40aa2b078e92025623594976fd32f6864c1e6b6ba74b50647f608e2418e6c336!]
PGP_PASSPHRASE: ENCRYPTED[!314a8fc344f45e462dd5e8dccd741d7562283a825e78ebca27d4ae9db8e65ce618e7f6aece386b2782a5abe5171467bd!]
maven_cache:
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
build_script:
Expand Down
54 changes: 45 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ env:
jobs:
sonar_release:
runs-on: ubuntu-latest
name: Start release process
name: Release
steps:
- name: LT release
id: lt_release
- name: Release
id: sonar_release
with:
distribute: true
publish_to_binaries: true
Expand All @@ -23,14 +23,9 @@ jobs:
slack_channel: lang-js-ts
env:
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_TOKEN: ${{ secrets.BINTRAY_TOKEN }}
BURGRX_USER: ${{ secrets.BURGRX_USER }}
BURGRX_PASSWORD: ${{ secrets.BURGRX_PASSWORD }}
CENTRAL_USER: ${{ secrets.CENTRAL_USER }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
CIRRUS_TOKEN: ${{ secrets.CIRRUS_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
PATH_PREFIX: ${{ secrets.BINARIES_PATH_PREFIX }}
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
RELEASE_SSH_USER: ${{ secrets.RELEASE_SSH_USER }}
Expand All @@ -44,4 +39,45 @@ jobs:
run: |
echo "${{ steps.lt_release.outputs.releasability }}"
echo "${{ steps.lt_release.outputs.release }}"
maven-central-sync:
runs-on: ubuntu-latest
needs:
- sonar_release
steps:
- name: Setup JFrog CLI
uses: jfrog/setup-jfrog-cli@v1
- name: JFrog config
run: jfrog rt config repox --url https://repox.jfrog.io/artifactory/ --apikey $ARTIFACTORY_API_KEY --basic-auth-only
env:
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
- name: Get the version
id: get_version
run: |
IFS=. read major minor patch build <<< "${{ github.event.release.tag_name }}"
echo ::set-output name=build::"${build}"
- name: Create local repository directory
id: local_repo
run: echo ::set-output name=dir::"$(mktemp -d repo.XXXXXXXX)"
- name: Download Artifacts
uses: SonarSource/gh-action_release/download-build@v3
with:
build-number: ${{ steps.get_version.outputs.build }}
local-repo-dir: ${{ steps.local_repo.outputs.dir }}
- name: Maven Central Sync
id: maven-central-sync
continue-on-error: true
uses: SonarSource/gh-action_release/maven-central-sync@v3
with:
local-repo-dir: ${{ steps.local_repo.outputs.dir }}
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
- name: Notify on failure
if: ${{ failure() || steps.maven-central-sync.outcome == 'failure' }}
uses: 8398a7/action-slack@v3
with:
status: failure
fields: repo,author,eventName
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_BUILD_WEBHOOK }}

0 comments on commit c83f838

Please sign in to comment.