Skip to content

fix: path to posting script #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 20, 2025
Merged
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
11 changes: 7 additions & 4 deletions .github/workflows/post_to_mastodon.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash

# Extract version from PR tag passed as environment variable
version="${PR_TITLE#v}"
if [ -z "${PR_TITLE}" ]; then # apparently unset, workflow broken?
echo "Error: 'PR_TITLE' environemnt variable is not set."
exit 1
fi
version="${PR_TITLE##* }"

# Validate version format
if ! [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
Expand All @@ -15,15 +19,14 @@ changelog="https://github.com/snakemake/snakemake-executor-plugin-slurm/releases
# Maximum character limit for Mastodon posts (on Fediscience: 1500 characters)
MAX_TOOT_LENGTH=1500


read -d '\n' message << EndOfText
Beep, Beep - I am your friendly #Snakemake release announcement bot
Beep, Beep - I am your friendly #Snakemake release announcement bot.

There is a new release of the Snakemake executor for #SLURM on #HPC systems. Its version is '${version}'!

See ${changelog//\'/\\\'} for details.

Give us some time and you will automatically find it on #Bioconda and #Pypi.
Give us some time and you will automatically find the plugin on #Bioconda and #Pypi.

If you want to discuss the release you will find the maintainers here on Mastodon!
@rupdecat@fediscience.org and @johanneskoester@fosstodon.org
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/post_to_mastodon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ jobs:
max_attempts: 3
command: |
export MASTODONBOT="${{ secrets.MASTODONBOT }}"
export PR_TITLE="${{ github.event.release.tag_name }}"
export PR_TITLE="${{ github.event.pull_request.title }}"
chmod +x $GITHUB_WORKSPACE/.github/workflows/post_to_mastodon.sh
$GITHUB_WORKSPACE/.github/workflows/post_to_mastodon.sh
Loading