Skip to content

Commit d207178

Browse files
authored
Add workflow for bumping patch release version (#80)
1 parent ff4ed5a commit d207178

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/patch-release.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish a new patch release 🚀
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
bump-version:
8+
outputs:
9+
version: ${{ steps.get-version.outputs.version }}
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
token: ${{ secrets.GIT_PUSH_PAT }}
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.9'
19+
20+
- name: Install and configure Poetry
21+
uses: snok/install-poetry@v1
22+
with:
23+
version: 1.8.2
24+
virtualenvs-create: false
25+
virtualenvs-in-project: false
26+
installer-parallel: true
27+
28+
- name: Bump version
29+
run: poetry version patch
30+
31+
- name: Get version
32+
id: get-version
33+
run: echo version=`poetry version -s` >> "$GITHUB_OUTPUT"
34+
- name: Print version
35+
run: |
36+
echo Version: ${{ steps.get-version.outputs.version }}
37+
- name: Update CHANGELOG.md (cross platform supported)
38+
run: |
39+
sed -i.bak -e 's/## Next/## Next\n\n## ${{ steps.get-version.outputs.version }}/' CHANGELOG.md && rm CHANGELOG.md.bak
40+
- uses: EndBug/add-and-commit@v9
41+
with:
42+
author_name: 'Neo4j-GenAI GitHub Action'
43+
author_email: 'team-gen-ai@neo4j.com'
44+
message: 'Bump version to ${{ steps.get-version.outputs.version }}'
45+
add: "['pyproject.toml', 'CHANGELOG.md']"
46+
tag: '${{ steps.get-version.outputs.version }}'

0 commit comments

Comments
 (0)