-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(release.yml): uses commitizen to bump version number
- Loading branch information
Showing
3 changed files
with
16 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[tool.commitizen] | ||
version = "0.1.0" | ||
version_files = "package.json:3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,25 @@ | ||
name: Release | ||
name: Bump version | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read # for checkout | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
|
||
bump_version: | ||
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }} | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
|
||
name: "Bump version and create changelog with commitizen" | ||
steps: | ||
- name: Checkout | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
token: "${{ secrets.GITHUB_TOKEN }}" | ||
- id: cz | ||
name: Create bump and changelog | ||
uses: commitizen-tools/commitizen-action@master | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: yarn release | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Print Version | ||
run: echo "Bumped to version ${{ steps.cz.outputs.version }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "inventory", | ||
"version": "0.0.0-development", | ||
"version": "0.1.0", | ||
"main": "index.js", | ||
"repository": "https://github.com/aviemet/icr.git", | ||
"author": "Avram Walden <[email protected]>", | ||
|