diff options
author | Trabelsi Tobias <tobias.trabelsi@sonarsource.com> | 2021-04-21 12:38:06 +0200 |
---|---|---|
committer | Malena Ebert <63863184+malena-ebert-sonarsource@users.noreply.github.com> | 2021-04-23 09:24:52 +0200 |
commit | 1f4778a5864d3b6ed66c0455664b2b4201a2d343 (patch) | |
tree | 7e2d3f581fc978048f916baca4cf8cb9431ef7d5 /.github | |
parent | e942a1c9dd5d9528930ce3fc76a4926247a0daa2 (diff) | |
download | sonar-scanner-cli-1f4778a5864d3b6ed66c0455664b2b4201a2d343.tar.gz sonar-scanner-cli-1f4778a5864d3b6ed66c0455664b2b4201a2d343.zip |
BUILD-909 updated release workflow for sonar-scanner-cli
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/release.yml | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 875f4a3..421d3c7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Run release action id: run_release - uses: SonarSource/gh-action_LT_release@v2 + uses: SonarSource/gh-action_release/main@v3 with: distribute: true publish_to_binaries: true @@ -25,14 +25,9 @@ jobs: slack_channel: sonarqube-build 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 }} @@ -69,3 +64,44 @@ jobs: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} with: args: "Release failed, see the logs at https://github.com/{{ GITHUB_REPOSITORY }}/actions by {{ GITHUB_ACTOR }}" + maven-central-sync: + runs-on: ubuntu-latest + needs: + - run_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 }} |