A local-first personal finance app
[AI] Add Discord notifications for new tags and published releases (#8611)
Matiss Janis Aboltins5d6c2b407f52
diff --git a/.github/workflows/discord-release-notifications.yml b/.github/workflows/discord-release-notifications.ymlnew file mode 100644index 0000000000..a51bb92222--- /dev/null+++ b/.github/workflows/discord-release-notifications.yml@@ -0,0 +1,51 @@+name: Discord Release Notifications++# Sends a Discord notification when a new tag is pushed or when a release+# is published. Uses the DISCORD_WEBHOOK_URL secret from the nightly-alerts+# environment (shared with the nightly theme catalog scan).+#+# Draft releases are not covered: GitHub does not deliver the `created`+# release activity type for drafts, so the earliest observable event is+# `published`.++on:+ push:+ tags:+ - '**'+ release:+ types: [published]++permissions:+ contents: read++jobs:+ notify:+ name: Notify Discord+ runs-on: depot-ubuntu-latest+ if: github.repository == 'actualbudget/actual'+ environment: nightly-alerts+ timeout-minutes: 5+ steps:+ - name: Notify Discord of new tag+ if: github.event_name == 'push' && github.event.created == true+ uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0+ with:+ webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}+ status: Success+ title: 'New tag: ${{ github.ref_name }}'+ description: Tag `${{ github.ref_name }}` was pushed to ${{ github.repository }}.+ url: ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }}+ username: Actual Releases+ nofail: true++ - name: Notify Discord of published release+ if: github.event_name == 'release'+ uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0+ with:+ webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}+ status: Success+ title: 'Release published: ${{ github.event.release.name || github.event.release.tag_name }}'+ description: A new release was published for ${{ github.repository }}.+ url: ${{ github.event.release.html_url }}+ username: Actual Releases+ nofail: truediff --git a/upcoming-release-notes/add-discord-release-notifications.md b/upcoming-release-notes/add-discord-release-notifications.mdnew file mode 100644index 0000000000..497d0d761c--- /dev/null+++ b/upcoming-release-notes/add-discord-release-notifications.md@@ -0,0 +1,6 @@+---+category: Maintenance+authors: [MatissJanis]+---++Add GitHub action that sends a Discord notification when a new tag is pushed or a release is published