Automate version bumps
Opened this issue · 0 comments
yvesgurcan commented
Problem
It would be great if version bumps could be handled when creating the build in GitHub instead of having to do version bumps manually with npm
.
Solution
Create a custom GitHub Action forked from paulhatch/semantic-version
(https://github.com/marketplace/actions/git-semantic-version) that takes a github_token
.
- name: Version bump
uses: paulhatch/semantic-version@v2
with:
branch: ${{ github.head_ref }}
# A string which, if present in a git commit, indicates that a change represents a major change
major_pattern: "(MAJOR)"
# Same as above except indicating a minor change
minor_pattern: "(MINOR)"
# A string to determine the format of the version output
format: "${major}.${minor}.${patch}"
github_token: ${{ secrets.GITHUB_TOKEN }}