oh-my-posh/.github/workflows/mastodon.yml
dependabot[bot] b3e75b106e chore(deps): bump actions/github-script from 6.3.3 to 6.4.0
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.3 to 6.4.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](d556feaca3...98814c53be)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-27 06:33:24 +01:00

41 lines
1.2 KiB
YAML

# <a rel="me" href="https://social.ohmyposh.dev/@releasebot">Mastodon</a>
name: Mastodon
on:
release:
types: [published]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notes 📝
id: notes
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975
with:
result-encoding: string
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 🐘
uses: cbrgm/mastodon-github-action@d98ab3376f941df14d37d5737961de431c0838c6
with:
message: |
📦 ${{ github.event.release.name }}
${{steps.notes.outputs.result}}
${{ github.event.release.html_url }}
#ohmyposh #oss #cli #opensource
visibility: "public"
env:
MASTODON_URL: "https://social.ohmyposh.dev/"
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}