-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a numeric field for version info
And setup auto publication
- Loading branch information
Showing
2 changed files
with
50 additions
and
1 deletion.
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,47 @@ | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pypi-publish: | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/inersphinx_registry | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Install built wheel | ||
run: pip install dist/* | ||
- name: Build package | ||
run: python -m build | ||
- name: Echo current tag | ||
run: echo ${{ github.ref }} | ||
- name: Get package version | ||
run: | | ||
PACKAGE_VERSION=$(python -c 'import matplotlib_inline; print(matplotlib_inline.__version__)') | ||
echo "Package version: $PACKAGE_VERSION" | ||
- name: Check tag and package version match | ||
run: | | ||
if [ "$GITHUB_REF" != "refs/tags/$PACKAGE_VERSION" ]; then | ||
echo "Tag and package version do not match. Aborting." | ||
exit 1 | ||
fi | ||
# - name: Publish package | ||
# uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc | ||
|
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
from . import backend_inline, config # noqa | ||
__version__ = "0.1.7" # noqa | ||
|
||
version_info = (0, 1, 7) | ||
__version__ = '.'.join(str(s) for s in version_info) # noqa |