From f8ff214e32f579a6d86be96e88e403092c93e401 Mon Sep 17 00:00:00 2001 From: abaudet Date: Wed, 13 Jan 2021 07:48:07 +0400 Subject: [PATCH] ci(release) Add information message for promoting release --- .github/workflows/release.yml | 58 ++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 52691f3fba..32168a7f85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,27 +53,27 @@ on: jobs: # FIXME: maven-release-plugin can't be used due to issue: https://issues.apache.org/jira/browse/MRELEASE-920 -# release: -# runs-on: ubuntu-18.04 -# steps: -# - uses: actions/checkout@v2 -# - uses: actions/setup-java@v1 -# with: -# java-version: 8 -# - name: Cache Maven packages -# uses: actions/cache@v2 -# with: -# path: | -# ~/.m2/repository -# !~/.m2/repository/fr/sii/ -# key: ${{ runner.os }}-m2-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/pom.xml') }} -# restore-keys: ${{ runner.os }}-m2-${{ secrets.CACHE_VERSION }} -# - name: "Release" -# run: -# ./mvnw release:prepare -# -DreleaseVersion=${{ github.event.inputs.release-version }} -# -DdevelopmentVersion=${{ github.event.inputs.next-dev-version }} -# -B + release: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: | + ~/.m2/repository + !~/.m2/repository/fr/sii/ + key: ${{ runner.os }}-m2-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2-${{ secrets.CACHE_VERSION }} + - name: "Release" + run: + ./mvnw release:prepare + -DreleaseVersion=${{ github.event.inputs.release-version }} + -DdevelopmentVersion=${{ github.event.inputs.next-dev-version }} + -B release: runs-on: ubuntu-18.04 steps: @@ -281,7 +281,6 @@ jobs: } wait-for-completion: false - slack: if: always() needs: [set-next-version, update-site, create-or-update-fix-branch] @@ -297,7 +296,17 @@ jobs: ([ "${{env.WORKFLOW_CONCLUSION}}" = "cancelled" ] && echo ":heavy_multiplication_x:") || echo ":interrobang:" ) - echo "STATUS_ICON=$ICON" >> $GITHUB_ENV + echo "STATUS_ICON=$ICON" >> $GITHUB_ENV + - run: > + echo "MESSAGE=" >> $GITHUB_ENV + - run: | + echo 'MESSAGE<> $GITHUB_ENV + echo '>v${{ github.event.inputs.release-version }} released on . ' >> $GITHUB_ENV + echo '> ' >> $GITHUB_ENV + echo '>You need to check that everything is fine and then promote to publish the release on Maven Central' >> $GITHUB_ENV + echo 'EOF' >> $GITHUB_ENV + if: ${{ env.WORKFLOW_CONCLUSION == 'success' }} + - run: echo "${{ env.MESSAGE }}" - uses: 8398a7/action-slack@v3 with: status: ${{ env.WORKFLOW_CONCLUSION }} @@ -307,7 +316,8 @@ jobs: icon_url: https://github.com/groupe-sii/ogham/raw/master/src/site/resources/img/ogham-blue-256x256.png text: | ${{ env.STATUS_ICON }} _${{ github.event.inputs.release-version }}_ - ${{ github.event.head_commit.message }} + + ${{ env.MESSAGE }} env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}