diff --git a/.gitea/workflows/announce.yml b/.gitea/workflows/announce.yml new file mode 100644 index 0000000..2ec29cd --- /dev/null +++ b/.gitea/workflows/announce.yml @@ -0,0 +1,17 @@ +# Announce each published release on the community forum, in this project's +# Announcements category (coffey-labs/actions discourse-release; the repo -> +# category map is its release-map.json). Safe to re-run: one topic per tag. +name: announce + +on: + release: + types: [published] + +jobs: + announce: + runs-on: light + steps: + - uses: coffey-labs/actions/discourse-release@e9293996e2efa770839121fa8f8da93083f216be + with: + api-key: ${{ secrets.DISCOURSE_RELEASE_KEY }} + discord-webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }} diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 74cb77b..451e36f 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -285,3 +285,16 @@ jobs: PY - if: always() run: docker logout "$REGISTRY" || true + + # The release above is made with the job's own token, and Gitea starts no + # workflow for events the Actions bot causes -- announce.yml's + # 'on: release' never fires for it -- so announce it from here. + announce: + needs: [release, binaries] + runs-on: light + steps: + - uses: coffey-labs/actions/discourse-release@e9293996e2efa770839121fa8f8da93083f216be + with: + api-key: ${{ secrets.DISCOURSE_RELEASE_KEY }} + discord-webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }} + tag: ${{ github.ref_name }}