Skip to content
Latchkey

Announce Release on Mastodon workflow (snakemake/snakemake)

The Announce Release on Mastodon workflow from snakemake/snakemake, explained and optimized by Latchkey.

C

CI health: C - fair

Point runs-on at Latchkey and get run de-duplication, job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: snakemake/snakemake.github/workflows/announce-release.ymlLicense MITView source

What it does

This is the Announce Release on Mastodon workflow from the snakemake/snakemake repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Announce Release on Mastodon

on:
  push:
    branches:
      - main
    paths:
      - 'CHANGELOG.md'

permissions:
  contents: read
  pull-requests: read
jobs:
  post_to_mastodon:
    if: "${{ contains(github.event.head_commit.message, 'chore(main): release') }}"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v7.0.0
      
      - name: Post to Mastodon
        uses: snakemake/mastodon-release-post-action@v1
        with:
          access-token: ${{ secrets.MASTODONBOT }}
          pr-title: ${{ github.event.head_commit.message }}
          image: "logo_dark.png"
          image-description: "Snakemake HPC logo for Mastodon"
          message: |
            BEEP, BEEP - I am your friendly #Snakemake release announcement bot.
            
            There is a new release of Snakemake. Its version now is {{ version }}!
            
            Give us some time, and you will automatically find it on #Bioconda and #Pypi.
            
            The maintainer is here on Mastodon -
            @johanneskoester@fosstodon.org .
            
            If you discover any issues, please report them on {{ issue_url }}.

            See {{ changelog }} for details. Here is the header of the changelog:
            
            ${{ steps.extract-release-notes.outputs.release_notes }}
            

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Announce Release on Mastodon
 
on:
  push:
    branches:
      - main
    paths:
      - 'CHANGELOG.md'
 
permissions:
  contents: read
  pull-requests: read
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  post_to_mastodon:
    timeout-minutes: 30
    if: "${{ contains(github.event.head_commit.message, 'chore(main): release') }}"
    runs-on: latchkey-small
    steps:
      - name: Checkout repository
        uses: actions/checkout@v7.0.0
      
      - name: Post to Mastodon
        uses: snakemake/mastodon-release-post-action@v1
        with:
          access-token: ${{ secrets.MASTODONBOT }}
          pr-title: ${{ github.event.head_commit.message }}
          image: "logo_dark.png"
          image-description: "Snakemake HPC logo for Mastodon"
          message: |
            BEEP, BEEP - I am your friendly #Snakemake release announcement bot.
            
            There is a new release of Snakemake. Its version now is {{ version }}!
            
            Give us some time, and you will automatically find it on #Bioconda and #Pypi.
            
            The maintainer is here on Mastodon -
            @johanneskoester@fosstodon.org .
            
            If you discover any issues, please report them on {{ issue_url }}.
 
            See {{ changelog }} for details. Here is the header of the changelog:
            
            ${{ steps.extract-release-notes.outputs.release_notes }}
            
 

What changed

1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow