Skip to content
Merged
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
32 changes: 24 additions & 8 deletions .github/workflows/create-release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,41 @@ jobs:
TAG="${{ steps.version.outputs.tag }}"
VERSION="${{ steps.version.outputs.version }}"
PRERELEASE="${{ github.event.inputs.prerelease }}"
COMMIT_SHORT="${{ steps.commit.outputs.short }}"
ACTOR="${{ github.actor }}"
COMMIT_MSG="${{ steps.commit.outputs.message }}"

# Create tag message
TAG_MESSAGE="Release $TAG
cat > /tmp/tag_message.txt <<'EOF'
Release $TAG

Automated release created from GitHub Actions workflow.

Commit: ${{ steps.commit.outputs.short }}
Created: $(date -u +"%Y-%m-%d %H:%M:%S UTC")
Created by: ${{ github.actor }}
Commit: $COMMIT_SHORT
Created: $TIMESTAMP
Created by: $ACTOR
Pre-release: $PRERELEASE

Release Notes:
${{ steps.commit.outputs.message }}
$COMMIT_MSG

πŸ€– Generated with Claude Code
"
Generated with Claude Code
EOF

# Replace variables in the file
TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
sed -i "s/\$TAG/$TAG/g" /tmp/tag_message.txt
sed -i "s/\$COMMIT_SHORT/$COMMIT_SHORT/g" /tmp/tag_message.txt
sed -i "s/\$TIMESTAMP/$TIMESTAMP/g" /tmp/tag_message.txt
sed -i "s/\$ACTOR/$ACTOR/g" /tmp/tag_message.txt
sed -i "s/\$PRERELEASE/$PRERELEASE/g" /tmp/tag_message.txt
sed -i "s/\$COMMIT_MSG/$COMMIT_MSG/g" /tmp/tag_message.txt

# Create annotated tag
git tag -a "$TAG" -m "$TAG_MESSAGE"
git tag -a "$TAG" -F /tmp/tag_message.txt
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding cleanup for the temporary file after the tag is created. While GitHub Actions runners are ephemeral and this won't cause issues in practice, it's a good practice to clean up temporary resources:

# Create annotated tag
git tag -a "$TAG" -F /tmp/tag_message.txt

# Clean up temporary file
rm -f /tmp/tag_message.txt
Suggested change
git tag -a "$TAG" -F /tmp/tag_message.txt
git tag -a "$TAG" -F /tmp/tag_message.txt
# Clean up temporary file
rm -f /tmp/tag_message.txt

Copilot uses AI. Check for mistakes.

# Clean up temporary file
rm -f /tmp/tag_message.txt

echo "βœ… Created tag: $TAG"

Expand Down
Loading