/update-majorver

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

Primary LanguageTypeScriptMIT LicenseMIT

GitHub Action: Update Major Version Tag

Test Release License

This GitHub Action updates major version tags (e.g. v1, v2) when semantic versioning tag is pushed. If v1.2.3 tag is pushed, it updates v1 tag. It works well with GitHub Action versioning.

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

name: Update Major Version Tag

on:
  push:
    tags:
      - "v*"

jobs:
  update-majorver:
    name: Update Major Version Tag
    runs-on: ubuntu-latest
    steps:
      - uses: nowactions/update-majorver@v1

Development

Install dependencies.

npm install

Run tests.

npm test

Release

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