From 82cf4ad7aaafa9c72e9503f76160a97f9aff0db2 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Fri, 2 Jul 2021 17:27:13 +0300 Subject: [PATCH] Added 'post release on Discord' to Github action --- .github/workflows/buildAndDeploy.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildAndDeploy.yml b/.github/workflows/buildAndDeploy.yml index 9dbbfd204f..c731692c82 100644 --- a/.github/workflows/buildAndDeploy.yml +++ b/.github/workflows/buildAndDeploy.yml @@ -69,6 +69,7 @@ jobs: mv desktop/build/libs/Unciv.jar deploy/Unciv.jar - name: Read release.md and use it as a body of new release + continue-on-error: true if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') id: read_release shell: bash @@ -80,7 +81,15 @@ jobs: #r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n' #r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r' echo "::set-output name=RELEASE_BODY::$r" # <--- Set environment variable - + + - name: Post announcement on Discord + continue-on-error: true + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + uses: Ilshidur/action-discord@0.3.2 + with: + args: '${{ steps.read_release.outputs.RELEASE_BODY }}' - name: Upload binaries to release