Skip to content

Commit

Permalink
improve version update
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Jul 18, 2024
1 parent 0c68b62 commit edf4671
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ jobs:
run: echo "VERSION=$(echo ${GITHUB_REF/refs\/tags\//})" >> $GITHUB_ENV

- name: Set version
run: poetry version ${{ env.VERSION }}
run: |
VERSION=${{ env.VERSION }}
poetry version ${VERSION#v}
- name: Publish PyPI package
env:
Expand All @@ -47,9 +49,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Update version in pyproject.toml
run: python .github/workflows/update_pyproject.py $(echo ${GITHUB_REF/refs\/tags\//})

- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/update_pyproject.py

This file was deleted.

2 changes: 2 additions & 0 deletions air_link/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from .main import main
from .version import __version__

__all__ = [
'main',
'__version__',
]
3 changes: 3 additions & 0 deletions air_link/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import importlib.metadata

__version__: str = importlib.metadata.version('air_link')

0 comments on commit edf4671

Please sign in to comment.