This action will fetch the latest tag/release created and bump the version with the level specific in the label of the PR. If no label is found, we will use a 'patch' bump.
Required The secret used to access github
Used to build the pre-release version (Default: 0
)
If no tag has been found (in the tags), this tag will be used. Should be a Semantic Version valid tag. If no tag can be found, and no fallback_tag is provided, we will throw an error.
If true, we will not post a message on the pull_request. (Default: false
)
The current version that we found (could be the fallback version provided if none is found)
The next version we will build, based on semVer with the {inputs.level} as bump parameter
The next pre-release version tag ({new_version}-alpha.{inputs.build_number})
Get the tag by using the action:
name: Bump version from tag
id: tag
uses: freight-hub/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
build_number: ${{ github.run_number }}
fallback_tag: 0.0.1
disable_inform: false
Update the yarn version with the output:
- run: yarn version --new-version ${{ steps.tag.outputs.new_version }} --no-git-tag-version
- run: yarn version --new-version ${{ steps.tag.outputs.pre_release_version }} --no-git-tag-version
When contributing to this library there are some points to note:
- Please run
yarn format
&yarn build
BEFORE pushing to the repository. - The
dist
folder is checked in (we compile the node_modules into it with@vercel/ncc
)- this is because we need to include the complete script in the repository for github
- Please keep this readme up to date
- After you have comitted, you can tag the repository to 'build' a new version for use in actions