From db197ac9daccf3d305ad5e40618a65a95f3d5dde Mon Sep 17 00:00:00 2001 From: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com> Date: Mon, 28 Mar 2022 12:10:03 +0200 Subject: [PATCH] Update release workflow (#957) --- .github/workflows/release.yml | 42 ++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7935f5c75..babd1f119c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,46 +1,47 @@ name: sonar-release -# This workflow is triggered when publishing a new github release + on: release: types: - published -env: - PYTHONUNBUFFERED: 1 - jobs: - sonar_release: + release: runs-on: ubuntu-latest - name: Start release process + name: Release steps: - - name: LT release - id: lt_release + - name: Configure AWS Credentials # Required for pushing the binaries + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.BINARIES_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.BINARIES_AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.BINARIES_AWS_REGION }} + - name: Release + id: release + uses: SonarSource/gh-action_release/main@v4 with: publish_to_binaries: true slack_channel: team-lang-phpy-notifs env: ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} + BINARIES_AWS_DEPLOY: ${{ secrets.BINARIES_AWS_DEPLOY }} # Required for pushing the binaries BURGRX_USER: ${{ secrets.BURGRX_USER }} BURGRX_PASSWORD: ${{ secrets.BURGRX_PASSWORD }} - CIRRUS_TOKEN: ${{ secrets.CIRRUS_TOKEN }} - PATH_PREFIX: ${{ secrets.BINARIES_PATH_PREFIX }} GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} - RELEASE_SSH_USER: ${{ secrets.RELEASE_SSH_USER }} - RELEASE_SSH_KEY: ${{ secrets.RELEASE_SSH_KEY }} SLACK_API_TOKEN: ${{secrets.SLACK_API_TOKEN }} - # Put your action repo here - uses: SonarSource/gh-action_release/main@v4 - - - name: Check outputs + - name: Release action results if: always() run: | - echo "${{ steps.lt_release.outputs.releasability }}" - echo "${{ steps.lt_release.outputs.release }}" + echo "${{ steps.release.outputs.releasability }}" + echo "${{ steps.release.outputs.promote }}" + echo "${{ steps.release.outputs.publish_to_binaries }}" + echo "${{ steps.release.outputs.release }}" - maven-central-sync: + maven-central-sync: # Only required for OSS projects runs-on: ubuntu-latest + name: Maven Central Sync needs: - - sonar_release + - release steps: - name: Setup JFrog CLI uses: jfrog/setup-jfrog-cli@v1 @@ -74,6 +75,7 @@ jobs: if: ${{ failure() || steps.maven-central-sync.outcome == 'failure' }} uses: 8398a7/action-slack@v3 with: + text: 'Maven sync failed' status: failure fields: repo,author,eventName env: