Skip to content

feat: Create release on push#3

Merged
prozolic merged 14 commits intoprozolic:mainfrom
sator-imaging:main
Feb 14, 2026
Merged

feat: Create release on push#3
prozolic merged 14 commits intoprozolic:mainfrom
sator-imaging:main

Conversation

@sator-imaging
Copy link
Copy Markdown
Contributor

@sator-imaging sator-imaging commented Feb 14, 2026

This PR solves the problem that the email is not sent even if "Watch" is set to "All Activity", by creating release on push to "archives" folder.

@sator-imaging
Copy link
Copy Markdown
Contributor Author

I am now trying to add link to the release page.

@sator-imaging
Copy link
Copy Markdown
Contributor Author

Test result (file was deleted for PR): https://github.com/sator-imaging/PRDigest.NET/releases/tag/archives-20260214

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a GitHub Actions workflow that automatically creates releases when markdown files are pushed to the archives directory. The purpose is to enable email notifications for users watching the repository with "All Activity" enabled, which doesn't happen with regular commits.

Changes:

  • Added a new workflow that triggers on pushes to archives/**/*.md files
  • Generates date-based tags and creates GitHub releases with links to the changed archive files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/create-release.yml
Comment thread .github/workflows/create-release.yml Outdated
Comment thread .github/workflows/create-release.yml Outdated
Comment thread .github/workflows/create-release.yml Outdated
Comment on lines +34 to +40
FILE=$(git diff-tree --no-commit-id --name-only -r HEAD | grep "^archives/.*$" | head -n 1)

if [ -z "$FILE" ]; then
echo "Error: No archives changes detected"
exit 1
fi

Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

Using 'head -n 1' means only the first changed file is included in the release, but if multiple archive files are pushed in a single commit, the other files will be ignored. This could lead to incomplete notifications. Consider either: 1) Creating separate releases for each changed file, 2) Including all changed files in the release notes, or 3) Failing the workflow if multiple files are detected to enforce one file per commit.

Suggested change
FILE=$(git diff-tree --no-commit-id --name-only -r HEAD | grep "^archives/.*$" | head -n 1)
if [ -z "$FILE" ]; then
echo "Error: No archives changes detected"
exit 1
fi
FILES=$(git diff-tree --no-commit-id --name-only -r HEAD | grep "^archives/.*$" || true)
if [ -z "$FILES" ]; then
echo "Error: No archives changes detected"
exit 1
fi
FILE_COUNT=$(printf '%s\n' "$FILES" | wc -l)
if [ "$FILE_COUNT" -ne 1 ]; then
echo "Error: Expected exactly one changed archive file, but found $FILE_COUNT:"
printf '%s\n' "$FILES"
exit 1
fi
FILE="$FILES"

Copilot uses AI. Check for mistakes.
prozolic and others added 3 commits February 14, 2026 12:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@prozolic
Copy link
Copy Markdown
Owner

@sator-imaging Thank you! Looks good, I'll merge this.

@prozolic prozolic merged commit 442b5ff into prozolic:main Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants