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/ci.yml b/.gitea/workflows/ci.yml index 2987339..a49a539 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -177,3 +177,17 @@ jobs: echo "release $TAG created" - 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: [publish] + if: ${{ startsWith(github.ref, 'refs/tags/inbuxa-v') }} + 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 }}