-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for bumping patch release version (#80)
- Loading branch information
Showing
1 changed file
with
46 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,46 @@ | ||
name: Publish a new patch release 🚀 | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
bump-version: | ||
outputs: | ||
version: ${{ steps.get-version.outputs.version }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GIT_PUSH_PAT }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install and configure Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.8.2 | ||
virtualenvs-create: false | ||
virtualenvs-in-project: false | ||
installer-parallel: true | ||
|
||
- name: Bump version | ||
run: poetry version patch | ||
|
||
- name: Get version | ||
id: get-version | ||
run: echo version=`poetry version -s` >> "$GITHUB_OUTPUT" | ||
- name: Print version | ||
run: | | ||
echo Version: ${{ steps.get-version.outputs.version }} | ||
- name: Update CHANGELOG.md (cross platform supported) | ||
run: | | ||
sed -i.bak -e 's/## Next/## Next\n\n## ${{ steps.get-version.outputs.version }}/' CHANGELOG.md && rm CHANGELOG.md.bak | ||
- uses: EndBug/add-and-commit@v9 | ||
with: | ||
author_name: 'Neo4j-GenAI GitHub Action' | ||
author_email: '[email protected]' | ||
message: 'Bump version to ${{ steps.get-version.outputs.version }}' | ||
add: "['pyproject.toml', 'CHANGELOG.md']" | ||
tag: '${{ steps.get-version.outputs.version }}' |