From 2f81fc2afff4cbf5475772f1eaedb97a3e8274f9 Mon Sep 17 00:00:00 2001 From: quentin-jaquier-sonarsource Date: Fri, 4 Mar 2022 16:39:03 +0100 Subject: [PATCH] Update release.yml caused by the migration of binaries and downloads to AWS (#3993) --- .github/workflows/release.yml | 41 ++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef118a3d77f..8d578780498 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,23 +5,22 @@ on: 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 + uses: aws-actions/configure-aws-credentials@v1 with: - distribute: true - publish_to_binaries: true - attach_artifacts_to_github_release: true - slack_channel: team-lang-java-notifs + 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 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 }} @@ -30,18 +29,23 @@ jobs: 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 + with: + publish_to_binaries: true # Used only if the binaries is delivered to costumers + slack_channel: team-lang-java-notifs + - name: Release action results if: always() run: | - echo "${{ steps.lt_release.outputs.releasability }}" - echo "${{ steps.lt_release.outputs.release }}" - maven-central-sync: + 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: # 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 @@ -75,6 +79,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: