This action will bump versions, create releases and manage tagging.
The following steps are taken:
- The
version
is parsed fromversion-file
- It
prerelease
(-#
) version (X.Y.Z-#
) is appended or incremented usingsemver
- The updated version and all modified files are committed (
git add .
) - A tag is pushed with the same name as the new version
- A draft release is created with the same name with a log of history since the last release
The following steps are taken:
- The
version
is parsed from theversion-file
- The Default Branch is checked out
- The
prerelease
(-#
) version (X.Y.Z-#
) is lobbed off usingsemver
- The updated version is committed
- A tag is pushed with the same name as the new version
- The name on the existing published release is updated to the new version
Required The action to run: 'prerelease' or 'postrelease'
Required The version file to manage, e.g. 'package.json'
Required The GitHub token for this repo
Optional: If set, will create/overwrite a tag representing the major release ('v1'). Only applicable during during postrelease
Optional: If set, this prefix will be added to any commit messages
Optional: If set, set the branch that version commits will be pushed to
This action has no outputs.
on:
push:
branches: [main]
jobs:
prerelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: scaffoldly/bump-version-action@main
with:
action: prerelease
version-file: package.json
repo-token: ${{ secrets.GITHUB_TOKEN }}
on:
release:
types: [published]
jobs:
prerelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: scaffoldly/bump-version-action@main
with:
action: postrelease
version-file: package.json
repo-token: ${{ secrets.GITHUB_TOKEN }}