Skip to content
package

GitHub Action

Check version increase and create release

0.0.2 Latest version

Check version increase and create release

package

Check version increase and create release

Checks if the version in package.json has increased, and if so, creates a new release

Installation

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

              

- name: Check version increase and create release

uses: Makepad-fr/auto-release-on-version-bump-action@0.0.2

Learn more about this action in Makepad-fr/auto-release-on-version-bump-action

Choose a version

Auto Release on Version Bump GitHub Action

This action checks if the version in package.json is incremented, and creates a new release for the new version if it is. If the version is not incremented, the action fails. This is useful for enforcing a versioning policy in your repositories.

Inputs

  • token: Required. The GitHub token.
  • name: The name of the release.
    • Defaults to "v$newVersion".
    • You can use $newVersion and $oldVersion in this field.
  • body: The body of the release.
    • Defaults to an empty string.
    • You can use $newVersion and $oldVersion in this field.
  • draft: A boolean indicating if the created release should be a draft.
  • Defaults to "false".
  • pre-release: Indicates if the release should be marked as a pre-release.
    • Available values: "true", "false", "auto".
    • Defaults to "auto".
    • If set to "auto", the action will determine if the new version is a pre-release and mark the release accordingly.
  • generate-release-note: A boolean indicating
    • Defaults to "true".
    • if a release note should be generated.
  • tag-name: The name of the tag to create.
    • Defaults to "$newVersion".
    • You can use $newVersion and $oldVersion in this field.
  • fail-on-unchanged-version: A boolean indicating if the action should fail when version in package.json file is not changed. It's usually useful for projects that using the action to run on each commit.
    • Default to false
    • When set to true the action will fail if the version in package.json is not chagned

Example usage

uses: Makepad-fr/auto-release-on-version-bump-actionp@v1.0.0
with:
  token: ${{ secrets.GITHUB_TOKEN }}
  name: 'Release $newVersion'
  body: 'Changes in this release: ...'
  draft: 'false'
  pre-release: 'auto'
  generate-release-note: 'true'
  tag-name: '$newVersion'

Support

If you encounter any issues or have any questions, please open an issue in the GitHub repository.