Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/announce-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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@v4

- 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: |
Yam, yam - I am your friendly #Snakemake release announcement bot.

There is a new release of Snakemake-Wrappers. Its version now is {{ version }}!


If you want to discuss the release, you will find the maintainer here on Mastodon!
@[email protected]

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 }}
Comment on lines +38 to +41
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Missing step definition causes workflow failure.

The workflow references steps.extract-release-notes.outputs.release_notes on line 41, but this step is not defined in the workflow. This will cause a runtime error.

Add the missing step before the "Post to Mastodon" step (e.g., after checkout):

      - name: Extract Release Notes
        id: extract-release-notes
        run: |
          # TODO: Implement extraction logic
          # Should parse CHANGELOG.md and extract the latest release notes
          echo "release_notes=..." >> $GITHUB_OUTPUT

Alternatively, if this step is defined in a reusable workflow or should be computed differently, clarify the intent.


🏁 Script executed:

#!/bin/bash
# Find and display the announce-release.yml workflow file
fd 'announce-release.yml' --type f

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Display the full content of the announce-release.yml file to verify the claim
if [ -f '.github/workflows/announce-release.yml' ]; then
  cat '.github/workflows/announce-release.yml'
fi

Length of output: 1331


🏁 Script executed:

#!/bin/bash
# Search across all workflow files for extract-release-notes step definition
rg -n 'extract-release-notes' '.github/workflows/' --type yaml -A 2 -B 2

Length of output: 344


🏁 Script executed:

#!/bin/bash
# Search all workflow files for any reference to announce-release workflow
rg -n 'announce-release' '.github/workflows/' --type yaml -A 1 -B 1

Length of output: 0


🏁 Script executed:

#!/bin/bash
# List all yaml files in .github/workflows/ to see all workflows
fd '\.ya?ml$' '.github/workflows/' --type f

Length of output: 225


🏁 Script executed:

#!/bin/bash
# Search for any step named extract-release-notes across all files
rg -n 'extract-release-notes' '.' --type yaml

Length of output: 0


Missing step extract-release-notes causes workflow failure.

The workflow references ${{ steps.extract-release-notes.outputs.release_notes }} on line 41, but this step is not defined anywhere in the workflow. This will cause a GitHub Actions runtime error when the workflow attempts to interpolate this undefined output.

Add the missing step before the "Post to Mastodon" step:

      - name: Extract Release Notes
        id: extract-release-notes
        run: |
          # Extract the latest release notes from CHANGELOG.md
          # This should capture the header/summary section of the latest release
          echo "release_notes=..." >> $GITHUB_OUTPUT

Define the extraction logic to parse CHANGELOG.md and output the latest release notes header.

🤖 Prompt for AI Agents
.github/workflows/announce-release.yml lines 38-41: the workflow references
steps.extract-release-notes.outputs.release_notes but no step with id
extract-release-notes exists, causing a runtime error; add a step immediately
before the "Post to Mastodon" step named "Extract Release Notes" with id:
extract-release-notes that reads CHANGELOG.md, parses/extracts the
header/summary for the latest release (e.g., first section under the most recent
version heading), and writes it to GITHUB_OUTPUT as release_notes (echo
"release_notes=... >> $GITHUB_OUTPUT") so the subsequent interpolation of ${{
steps.extract-release-notes.outputs.release_notes }} resolves correctly.


Binary file added pr-logo/logo_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pr-logo/logo_dark.xcf
Binary file not shown.
Loading