Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/create-release-on-version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Create Release on Version Bump

on:
push:
branches:
- main

jobs:
tag-and-release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Extract version
id: get_version
run: |
version=$(grep -m1 'version = ' pyproject.toml | cut -d'"' -f2)
echo "::set-output name=VERSION::$version"

- name: Create Tag
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git tag v${{ steps.get_version.outputs.VERSION }}
git push origin v${{ steps.get_version.outputs.VERSION }}

- name: Create Release
uses: actions/create-release@v1
with:
tag_name: v${{ steps.get_version.outputs.VERSION }}
release_name: Release ${{ steps.get_version.outputs.VERSION }}
body: |
Release of version ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@
name: Upload Python Package

on:
push:
branches: [ "main" ]
release:
types: [created]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
Expand All @@ -36,4 +35,5 @@ jobs:
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI}}
password: ${{ secrets.PYPI }}

Loading