-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1.15 KB
/
bump_poetry.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Update Python Poetry packages
on:
push:
branches:
- main
env:
# The version type to update, based on the commit message (either patch for bug/fix or minor for all other commits)
VERSION_TYPE: ${{ (startsWith(github.event.head_commit.message, 'Fix') ||
startsWith(github.event.head_commit.message, 'fix') ||
startsWith(github.event.head_commit.message, 'Bug') ||
startsWith(github.event.head_commit.message, 'bug')) &&
'patch' || 'minor' }}
jobs:
update-packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.4.2
- name: bump up patch version
run: |
git config user.name github-actions
git config user.email [email protected]
poetry version ${{ env.VERSION_TYPE }}
git add pyproject.toml
git commit -m "bump up ${{ env.VERSION_TYPE }} version from workflow"
git push