Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
tag

GitHub Action

Actions Tagger

v1.0.3

Actions Tagger

tag

Actions Tagger

Keep your action versions up-to-date by automatically promoting a major version each time a minor release is created

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Actions Tagger

uses: Actions-R-Us/[email protected]

Learn more about this action in Actions-R-Us/actions-tagger

Choose a version

Actions Tagger

🚤 Keep your action versions up-to-date by automatically promoting a major tag (and optionally, a latest tag) each time a release is created.

Rationale

According to the github actions versioning guide, actions publishers should have a major tag (v1, v2, etc) which points to the latest version of any minor/patch release for easy use by the consumers.

I found this process quite tedious, and repetetive and that is why this action exists. If you have published an action and would like to have your action follow the same versioning structure as many others in the marketplace, then simply create a release workflow that includes this action. See the usage example.


Inputs

publish_latest

Indicates to the action whether or not to create/update a tag called latest pointing to the latest release. Default "false".

Outputs

tag

The major tag that was published.

latest

Was the latest tag also published?

Env

GITHUB_TOKEN

Required A github token used for creating an octoclient for making API calls

Debug Logging

This action supports debug logging. When enabled, it will dump the output of the api call for creating the tags. This is useful for testing and should be included when reporting bugs.

Usage

versioning.yml

name: Keep the versions up-to-date

on:
  release:
    types: [published]

jobs:
  actions-tagger:
    runs-on: windows-latest
    steps:
      - uses: Actions-R-Us/actions-tagger@latest
        with:
          publish_latest: true
        env:
          GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}'

Note this action is able to detect if it is being run in a release context, and if not it will display a message and exit gracefully.

Similar projects

  • Only publishes the latest tag