2023-05-18 23:47:04 +01:00
2023-05-18 22:37:19 +00:00
2023-05-18 23:32:43 +01:00
2023-05-18 23:32:43 +01:00
2023-05-18 23:32:43 +01:00
2023-05-18 22:37:19 +00:00
2023-05-18 23:32:43 +01:00
2023-05-18 23:36:40 +01:00
2023-05-18 23:32:43 +01:00
2023-05-18 23:32:43 +01:00

update-tags-action

Create/update git tags via GitHub API.

GitHub tag (latest SemVer) GitHub issues GitHub pull requests License Status

A simple action to easily create/update one or more tags in a GitHub repository.

Generally useful for moving major (v1) and minor (v1.2) tags to same commit as the latest v1.x.x tag. This action uses itself to move it's own major and minor tags.

Examples

Basic

- uses: jimeh/update-tags-action@v1
  with:
    tags: v1,v1.2
- uses: jimeh/update-tags-action@v1
  with:
    tags: |
      v1
      v1.2

With Release Please

This example uses jimeh/release-please-manifest-action, but you can just as easily use the official google-github-actions/release-please-action instead.

name: Push
on: push

jobs:
  release-please:
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
    steps:
      - uses: jimeh/release-please-manifest-action@v1
        id: release-please
      - uses: jimeh/update-tags-action@v1
        with:
          tags: |
            v${{ steps.release-please.outputs.major }}
            v${{ steps.release-please.outputs.major }}.${{ steps.release-please.outputs.minor }}

Inputs

parameter description required default
tags List/CSV of tags to create/update. true
ref The SHA or ref to tag. Defaults to SHA of current commit. false ${{ github.sha }}
when_exists What to do if the tag already exists. Must be one of 'update', 'skip', or 'fail'. false update
github_token The GitHub token to use for authentication. false ${{ github.token }}

Outputs

parameter description
tags List of tags that were created/updated.
created List of tags that were created.
updated List of tags that were updated.
Description
Easily create/update one or more Git tags in a GitHub repository.
Readme MIT 23 MiB
Languages
TypeScript 96.5%
JavaScript 3.1%
Ruby 0.4%