oh-my-posh/.github/workflows/mastodon.yml
dependabot[bot] 7a25ede91a chore(deps): bump cbrgm/mastodon-github-action from 1.0.1 to 1.0.2
Bumps [cbrgm/mastodon-github-action](https://github.com/cbrgm/mastodon-github-action) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/cbrgm/mastodon-github-action/releases)
- [Commits](6cffb7d449...845d2db774)

---
updated-dependencies:
- dependency-name: cbrgm/mastodon-github-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 07:03:32 +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@d556feaca394842dc55e4734bf3bb9f685482fa0
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@845d2db774a6ac1c058f0fc7559023797b9d05ae
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 }}