Skip to content

Commit cefd921

Browse files
committed
ci(bump-version.yml,python-app.yml): add auto bump on push to main
1 parent e6ea9ed commit cefd921

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.github/workflows/bump-version.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Bump version
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
bump_version:
9+
if: ${{ startsWith(github.event.head_commit.message, 'bump:') }}
10+
name: "Bump version and create changelog with commitizen"
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
token: "${{ secrets.GITHUB_TOKEN }}"
19+
20+
- id: cz
21+
name: Create bump and changelog
22+
uses: commitizen-tools/commitizen-action@master
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Print Version
27+
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"

.github/workflows/python-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414

1515
jobs:
1616
build:
17-
17+
if: ${{ startsWith(github.event.head_commit.message, 'bump:') }}
1818
runs-on: ubuntu-latest
1919

2020
strategy:

0 commit comments

Comments
 (0)