Skip to content
tag

GitHub Action

Update Major Version

v1.1.2 Latest version

Update Major Version

tag

Update Major Version

Update major version tags for GitHub Actions based on semantic versioning tags

Installation

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

              

- name: Update Major Version

uses: nowactions/update-majorver@v1.1.2

Learn more about this action in nowactions/update-majorver

Choose a version

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