Skip to content

Latest commit

 

History

History
49 lines (43 loc) · 1.1 KB

README.md

File metadata and controls

49 lines (43 loc) · 1.1 KB

action-next-semver

Return the version incremented by the release type obtained from pull request tags. Аvailable tags:

  • major
  • premajor
  • minor
  • preminor
  • patch
  • prepatch
  • prerelease

Usage

name: PR release version

on:
  pull_request:
    types: [opened]

jobs:
  replace-title:
    runs-on: ubuntu-latest
    steps:
      - name: "Checkout repository"
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: get current version
        id: package-version
        uses: martinbeentjes/npm-get-version-action@master

      - name: get next version
        id: next-package-version
        uses: KazanExpress/[email protected]
        with:
          version: ${{ steps.package-version.outputs.current-version}}

      - name: replace pr title
        uses: KazanExpress/[email protected]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          find: "^.*$"
          replace: "Release v${{ steps.next-package-version.outputs.next-version }}"

Input

version: version to be increased

Output

next-version: increased version