Skip to content
package

GitHub Action

Next semantic-release version

v4.0.13 Latest version

Next semantic-release version

package

Next semantic-release version

GitHub Action to calculate the next semantic-release version number

Installation

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

              

- name: Next semantic-release version

uses: semantic-release-action/next-release-version@v4.0.13

Learn more about this action in semantic-release-action/next-release-version

Choose a version

next-release-version

Build Status

next-release-version is a GitHub Action that calculates the next semantic-release version number (if any).

Use

In the first job, invoke this workflow:

---
jobs:
  get-next-version:
    uses: semantic-release-action/next-release-version/.github/workflows/next-release-version.yml@v4

In the next job, reference the workflow's outputs:

jobs:
  do-the-thing:
    name: Zhu Li, do the thing
    runs-on: ubuntu-latest
    if: needs.get-next-version.outputs.new-release-published == 'true'
    needs:
      - get-next-version

    steps:
      - run: ./do-the-thing ${{ needs.get-next-version.outputs.new-release-version }}

Here is a complete workflow you can use as a reference.

Outputs

This workflow exports the following outputs:

Output Description
new-release-published Indicates whether a new release will be published. The value is a string, either "true" or "false".
new-release-version If a new release will be published, the version of the new release. The value is a string, for example "1.3.0".