Action Tagger automatically sets semantic tags when releasing a new version of a GitHub action. This action adheres to GitHub's action versioning guide, and removes the tedious task of having to manually set and shift tags like v1
and v1.2
to ensure they always point to a newer release. Tags produced and managed by this action will continue to work alongside other methods for referencing a release such as pointing to a branch, SHA, or other tags to meet different needs. In fact, Action Tagger currently manages its own release tags in a very similar way as described further down.
- Automate the setting and shifting of first and second level semantic tags.
- Optionally set a
latest
tag to use as an alternative to pointing tomain
. - Support for working in conjunction with other automated workflows like release generators.
- Tag format is validated during a run to ensure correct conformity.
- Support for running the action in a dry run mode without making actual changes.
- Summary reports are generated after each run.
- Reference outputs of managed tags for additional possibilities.
Below is a list of GitHub-hosted runners that support jobs using this action.
Runner | Supported? |
---|---|
✅ | |
✅ | |
✅ |
The following inputs are available:
Name | Type | Required | Default | Description |
---|---|---|---|---|
enable‑dry‑run | string |
false |
false |
Indicates whether or not to perform a dry run without pushing tags. |
set‑latest‑tag | string |
false |
false |
Indicates whether or not to also set the latest tag. |
release‑version | string |
false |
${{ github.ref }} |
Overrides the release version used for processing (e.g., v1.0.0 or refs/tags/v1.0.0 ). |
github‑token | string |
false |
${{ github.token }} |
Overrides the default GitHub token used to authenticate against a repository for Git context. |
Note
Enabling dry run will use a dummy version of v1.0.0 regardless of what version tags are available, or what override value is provided.
The following outputs are available:
Name | Type | Example | Description |
---|---|---|---|
major_release | string |
v1 | The latest major release version. |
minor_release | string |
v1.2 | The latest major and feature release version. |
full_release | string |
v1.2.3 | The full release version. |
latest_tag | string |
false | Indicates whether of not the latest tag was set. |
Implementing this action is relatively simple with just a few steps.
-
Below is a working example of a typical release workflow using Action Tagger. Add this to a file called something like
action-release-workflow.yml
, and place it in the.github/workflows/
folder. Token permissions have been scoped down tocontents:write
with support for pushing tags.name: action-release-tags on: release: types: [released, edited] jobs: action-tagger: name: action-tagger runs-on: ubuntu-latest permissions: contents: write environment: releases steps: - uses: actions/checkout@v4 with: # Disabling shallow clone ensures all commits # and tags are available at checkout. fetch-depth: 0 - name: Tag Release id: action-tagger uses: stevenjdh/action-tagger@v1 with: set-latest-tag: true
-
When it's time to create a release, ensure that the tag being set is using the format
vX.X.X
. For example,v1.2.3
. This will trigger the process and automate the rest. -
Done. Feel free to edit the release if a mistake was made, and Action Tagger will reflect the changes for this as well.
Tip
If using a release generator, define this action in that workflow and override the version used for processing with the generated one. This is needed because the release event will not be triggered due to safeguards in the default GitHub token for preventing recursive workflow runs. Alternatively, use a PAT with either workflow
or repo
scoped permissions, as PATs do not have the same limitations, except for the need to manage their expiration.
Action Tagger is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Thanks for your interest in contributing! There are many ways to contribute to this project. Get started here.
Many commonly asked questions are answered in the FAQ: https://github.com/StevenJDH/action-tagger/wiki/FAQ
Method | Address |
---|---|
PayPal: | https://www.paypal.me/stevenjdh |
Cryptocurrency: | Supported options |
// Steven Jenkins De Haro ("StevenJDH" on GitHub)