-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.01 KB
/
bump_version.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 version
on:
pull_request_target:
types:
- closed
branches:
- test_version
jobs:
bump-up-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.4.2
- name: bump up patch version and update version in template_input.yaml
uses: actions/checkout@v4
with:
token: ${{ secrets.VERSION_DECOIMPACT }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
poetry version patch
PROJECT_VERSION=$(poetry version --short)
sed -i "1 s/.*/version: $PROJECT_VERSION/" template_input.yaml
git add template_input.yaml
git add pyproject.toml
git commit -m "bump up patch version from workflow: version $PROJECT_VERSION"
git push