From 526b1cf76f70af7a392a2c10bafbed9806632ee3 Mon Sep 17 00:00:00 2001 From: unRekable Date: Tue, 20 Oct 2026 18:08:47 +0200 Subject: [PATCH 1/2] Post each published release to the community's #releases channel. --- .github/workflows/release.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6a3873..e62b3fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -225,6 +225,8 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + env: + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} steps: - uses: actions/checkout@v5 - name: Name the files @@ -250,7 +252,16 @@ jobs: with: name: release-all path: dist/* - - uses: softprops/action-gh-release@v3 + - id: release + uses: softprops/action-gh-release@v3 if: github.ref_type == 'tag' && (github.event_name == 'push' || inputs.publish) with: files: dist/* + # The release lands in the community's #releases channel once the webhook's URL sits in + # the DISCORD_WEBHOOK_URL secret (an admin sets it). Nothing posts while it is unset, and + # a Discord hiccup does not fail a published release. + - name: Post the release to Discord + if: steps.release.outputs.url != '' && env.DISCORD_WEBHOOK_URL != '' + run: | + payload=$(jq -n --arg content "**tinyclient $VERSION is out.** Download: ${{ steps.release.outputs.url }} Checksums are in SHA256SUMS on the release page." '{content: $content}') + curl -fsS -H "Content-Type: application/json" -d "$payload" "$DISCORD_WEBHOOK_URL" From 168406f491e707396a2a28ea8ffeefbec03721a9 Mon Sep 17 00:00:00 2001 From: Justin Scroggins Date: Sat, 24 Oct 2026 12:42:45 -0400 Subject: [PATCH 2/2] Keep the Discord release webhook scoped to its step and non-fatal. --- .github/workflows/release.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e62b3fb..2b0af55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -225,8 +225,6 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - env: - DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} steps: - uses: actions/checkout@v5 - name: Name the files @@ -261,7 +259,12 @@ jobs: # the DISCORD_WEBHOOK_URL secret (an admin sets it). Nothing posts while it is unset, and # a Discord hiccup does not fail a published release. - name: Post the release to Discord - if: steps.release.outputs.url != '' && env.DISCORD_WEBHOOK_URL != '' + if: steps.release.outputs.url != '' + continue-on-error: true + env: + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + RELEASE_URL: ${{ steps.release.outputs.url }} run: | - payload=$(jq -n --arg content "**tinyclient $VERSION is out.** Download: ${{ steps.release.outputs.url }} Checksums are in SHA256SUMS on the release page." '{content: $content}') + [ -n "$DISCORD_WEBHOOK_URL" ] || exit 0 + payload=$(jq -n --arg content "**tinyclient $VERSION is out.** Download: $RELEASE_URL Checksums are in SHA256SUMS on the release page." '{content: $content}') curl -fsS -H "Content-Type: application/json" -d "$payload" "$DISCORD_WEBHOOK_URL"