2024.04.02 #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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="${{ github.event_name == 'release' && github.event.release.html_url || format('{0}/{1}', github.server_url, github.repository) }}" | |
echo "value=$URL" >> "$GITHUB_OUTPUT" | |
- name: Toot | |
id: mastodon | |
uses: cbrgm/[email protected] | |
with: | |
message: | | |
🦀 Rusty Playdate Updated! | |
${{ inputs.message || (github.event_name == 'release' && format('New release published: {0}', github.event.release.name) || '') }} | |
${{ steps.url.outputs.value }} | |
#RustLang #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 }} |