2022-11-29 00:39:26 -08:00
|
|
|
# <a rel="me" href="https://social.ohmyposh.dev/@releasebot">Mastodon</a>
|
|
|
|
|
2022-11-27 10:39:42 -08:00
|
|
|
name: Mastodon
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
notify:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Notes 📝
|
|
|
|
id: notes
|
2023-01-26 16:25:46 -08:00
|
|
|
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975
|
2022-11-27 10:39:42 -08:00
|
|
|
with:
|
2022-11-28 22:06:30 -08:00
|
|
|
result-encoding: string
|
2022-11-27 10:39:42 -08:00
|
|
|
script: |
|
|
|
|
notes = context.payload.release.body
|
|
|
|
|
|
|
|
// replace all non-supported characters
|
|
|
|
notes = notes.replaceAll('###', '')
|
|
|
|
notes = notes.replaceAll('**', '')
|
|
|
|
notes = notes.replace(/ \(\[[0-9a-z]+\]\(.*\)/g, '')
|
|
|
|
notes = notes.trim()
|
|
|
|
return notes
|
|
|
|
- name: Toot 🐘
|
2023-01-10 16:36:42 -08:00
|
|
|
uses: cbrgm/mastodon-github-action@d98ab3376f941df14d37d5737961de431c0838c6
|
2022-11-27 10:39:42 -08:00
|
|
|
with:
|
2022-11-28 22:06:30 -08:00
|
|
|
message: |
|
|
|
|
📦 ${{ github.event.release.name }}
|
|
|
|
|
|
|
|
${{steps.notes.outputs.result}}
|
|
|
|
|
|
|
|
${{ github.event.release.html_url }}
|
|
|
|
|
|
|
|
#ohmyposh #oss #cli #opensource
|
2022-11-27 10:39:42 -08:00
|
|
|
visibility: "public"
|
|
|
|
env:
|
|
|
|
MASTODON_URL: "https://social.ohmyposh.dev/"
|
|
|
|
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
|