diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..4452e09 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,21 @@ +name: Package version bump +on: + push: + branches: + - main + +jobs: + bump: + name: Version bump + runs-on: ubuntu-latest + steps: + + - name: Check out Git repository + uses: actions/checkout@v4 + + - name: Bump the version + uses: jpb06/bump-package@latest + with: + major-keywords: M,MAJOR,major + minor-keywords: m,minor + patch-keywords: fix,patch diff --git a/README.md b/README.md index 2b0f5fc..4ff19f6 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,24 @@ $ pnpm install Once you installed depedencies you are good to start development, no other action is required. + +## Version update + +Package version update is done automatically according to commit message. Check it here: [Bump package version](https://github.com/marketplace/actions/bump-package-version). + +- there is no default version bump, be sure to provide correct commit message in case you want to update the version +- check different options for providing commit message for different [merge strategies](https://github.com/marketplace/actions/bump-package-version#-pull-requests) + + +For automatic version bump start you commit message with: + +**MAJOR** - `M:`,` MAJOR:`, `major:` + +**MINOR** - `m:`, `minor:` + +**PATCH** - `fix:`, `patch:` + + ## Publication To publish next version of this npm package first create a branch from `main`. Release branch should be named: `release-[versionTag]`, where `[versionTag]` is tag of version you want to publish.