-
-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (39 loc) · 1.14 KB
/
post.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Post
on:
release:
types: [published]
workflow_dispatch:
inputs:
message:
description: "Just message to post."
required: false
workflow_call:
inputs:
message:
type: string
description: "Just message to post."
required: false
jobs:
post:
name: Post
runs-on: ubuntu-latest
steps:
- name: Repo Url
id: url
run: |
URL="${{ format('{0}/{1}', github.server_url, github.repository) }}"
echo "value=$URL" >> "$GITHUB_OUTPUT"
- name: Toot
id: mastodon
uses: cbrgm/mastodon-github-action@v2.0.1
with:
message: |
🦀 Rusty Playdate Updated!
${{ inputs.message || (github.event_name == 'release' && 'New release published.' || '') }}
${{ steps.url.outputs.value }}
#rust #rustdev #playdate
# TODO: Write good-look link like [github.event.repository.name](url)
language: "en"
visibility: public # use `unlisted` for tests
url: ${{ secrets.MASTODON_URL }}
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}