-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: FRON-26 semantic release via github actions
- Loading branch information
1 parent
509af16
commit 7b42784
Showing
4 changed files
with
42 additions
and
0 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,5 @@ | ||
[tool.commitizen] | ||
version = "0.1.0" | ||
version_files = ["package.json:version", "VERSION"] | ||
update_changelog_on_bump = true | ||
major_version_zero = true |
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,36 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
release: | ||
# create a release following the logic below: | ||
# 1. branch is `main` AND | ||
# 2. workflow is triggered by a push event AND | ||
# 3. the head commit's commit message does NOT starts with `bump:` | ||
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' && ! startsWith(github.event.head_commit.message , 'bump:') }} | ||
name: ⬆️ Bump version and create changelog with a GitHub release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.SVC_PAT }} | ||
|
||
- name: Create bump and changelog | ||
uses: commitizen-tools/commitizen-action@ee36ca9396bdc21d6003d1e045bfecf26ad85029 | ||
with: | ||
github_token: ${{ secrets.SVC_PAT }} | ||
changelog_increment_filename: body.md | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 | ||
with: | ||
body_path: 'body.md' | ||
tag_name: ${{ env.REVISION }} # this is the version set in the previous step | ||
token: ${{ secrets.SVC_PAT }} | ||
generate_release_notes: true |
Empty file.
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 @@ | ||
0.1.0 |