From b8690ec1d1df2e5f3d7a018070be0180dfa3257e Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Fri, 28 Jul 2023 15:12:37 -0400 Subject: [PATCH] Update release action to choose between preview and stable URL in Discord announcements This is what ChatGPT told me, so we'll see. --- .github/workflows/release_actions.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_actions.yml b/.github/workflows/release_actions.yml index 6c3b3d57c0..f767324e4f 100644 --- a/.github/workflows/release_actions.yml +++ b/.github/workflows/release_actions.yml @@ -6,6 +6,16 @@ jobs: discord_release: runs-on: ubuntu-latest steps: + - name: Get appropriate URL + id: get-appropriate-url + run: | + if [ "${{ github.event.release.prerelease }}" == "true" ]; then + URL="https://zed.dev/releases/preview/latest" + else + URL="https://zed.dev/releases/stable/latest" + fi + echo "::set-output name=URL::$URL" + - name: Discord Webhook Action uses: tsickert/discord-webhook@v5.3.0 with: @@ -13,6 +23,6 @@ jobs: content: | 📣 Zed ${{ github.event.release.tag_name }} was just released! - Restart your Zed or head to https://zed.dev/releases/stable/latest to grab it. + Restart your Zed or head to ${{ steps.get-appropriate-url.outputs.URL }} to grab it. ${{ github.event.release.body }}