Add customizable tag format with date/time/SHA tokens#1
Merged
Conversation
Users can now customize the tag format using the new tag-format input
parameter. Supports various tokens including year, month, day, hour,
minute, second (both padded and unpadded), and SHA with configurable
length.
Features:
- Add tag-format input parameter with comprehensive token support
- Support both padded ({MM}) and non-padded ({M}) date/time formats
- Support 2-digit ({YY}) and 4-digit ({YYYY}) year formats
- Support variable-length SHA via {sha:N} syntax
- Include semver-compatible format examples
- Link to semver checker for validation
Default format remains backward compatible: {YYYY}{MM}{DD}-{HH}{mm}{ss}-{sha:8}
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Rename tagFormat to tag and remove unnecessary const declaration. The variable is directly assigned the final tag value through successive replacements. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update all usage examples to reference v2 as this release introduces the new tag-format feature which requires a new version tag. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Change default tag-format from {sha:8} to {sha:7} to maintain backward
compatibility with v1, which used 7-character SHA by default.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add new output 'long-sha' that provides the full commit SHA, in addition to the existing 'short-sha' output. Updates: - Add long-sha output definition in action.yml - Set long-sha output with full SHA value - Update README outputs table - Update example workflow to demonstrate long-sha usage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Change "Deploying" to "Release tag:" for better clarity in the example that demonstrates using outputs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit 762bafe. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a customizable
tag-formatinput parameter that allows users to format release tags using various date, time, and SHA tokens. The default format remains backward compatible.Key Features
Comprehensive token support:
{YYYY}(4-digit),{YY}(2-digit){MM}(padded),{M}(unpadded){DD}(padded),{D}(unpadded){HH}(padded),{H}(unpadded){mm}(padded),{m}(unpadded){ss}(padded),{s}(unpadded){sha}(full),{sha:N}(N characters)Semver compatibility: Users can create semver-compatible tags like
{YYYY}.{M}.{D}(e.g.,2024.4.26)Backward compatible: Default format remains
{YYYY}{MM}{DD}-{HH}{mm}{ss}-{sha:8}Examples
Documentation
🤖 Generated with Claude Code