From 42774aba969ffd1e339f24bbf1a49037874713c5 Mon Sep 17 00:00:00 2001 From: Drew Smirnoff Date: Mon, 23 Feb 2026 13:30:20 +0400 Subject: [PATCH] ci: add mastodon-notify (#181) --- .github/workflows/mastodon-notify.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/mastodon-notify.yml diff --git a/.github/workflows/mastodon-notify.yml b/.github/workflows/mastodon-notify.yml new file mode 100644 index 0000000000000000000000000000000000000000..6d207126d038fb3617e528d7194df24ea01a2006 --- /dev/null +++ b/.github/workflows/mastodon-notify.yml @@ -0,0 +1,23 @@ +name: Announce Release on Fosstodon + +on: + release: + types: [published] + +jobs: + post-to-fosstodon: + runs-on: ubuntu-latest + steps: + - name: Send Post to Fosstodon + env: + MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} + MESSAGE: | + Release ${{ github.event.release.tag_name }} of Matcha is out! + Check it out! ${{ github.event.release.html_url }} + run: | + JSON_PAYLOAD=$(jq -n --arg status "$MESSAGE" '{status: $status}') + + curl -sS -X POST "https://fosstodon.org/api/v1/statuses" \ + -H "Authorization: Bearer $MASTODON_ACCESS_TOKEN" \ + -H "Content-Type: application/json" \ + -d "$JSON_PAYLOAD"