Skip to content

Commit

Permalink
ci(release) Add information message for promoting release
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelien-baudet committed Jan 13, 2021
1 parent 89e4ccb commit f8ff214
Showing 1 changed file with 34 additions and 24 deletions.
58 changes: 34 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -281,7 +281,6 @@ jobs:
}
wait-for-completion: false


slack:
if: always()
needs: [set-next-version, update-site, create-or-update-fix-branch]
Expand All @@ -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<<EOF' >> $GITHUB_ENV
echo '>v${{ github.event.inputs.release-version }} released on <https://oss.sonatype.org/#stagingRepositories|staging repository>. ' >> $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 }}
Expand All @@ -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 }}

Expand Down

0 comments on commit f8ff214

Please sign in to comment.