hongaar / update-major-version-tag

GitHub Action to update major version tags based on semver for GitHub Actions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

update-major-version-tag GitHub tag (latest SemVer)

This GitHub Action updates major version tags (e.g. v1, v2) when a tag is pushed or release is created.

For example, when a v1.2.3 tag is pushed it updates the v1 tag to support the recommended GitHub Action versioning release management strategy.

Usage

Prerequisites

Create a workflow .yml file in your .github/workflows directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for creating a workflow file.

Example

# .github/workflows/update-major-version-tag.yml
name: update-major-version-tag

on:
  release:
    types: [published, edited]

jobs:
  update-major-version-tag:
    runs-on: ubuntu-latest
    steps:
      - uses: hongaar/update-major-version-tag@v1

Credits

This is a fork of nowactions/update-majorver with only a tiny change in order to support the release trigger as well as the push trigger.

Development

Install dependencies.

npm install

Run tests.

npm test

Release

  • Bump up the version in package.json
  • Commit the changes
  • Run npm run release

About

GitHub Action to update major version tags based on semver for GitHub Actions

License:MIT License


Languages

Language:TypeScript 90.8%Language:JavaScript 9.2%