Skip to content

Commit

Permalink
Merge pull request #509 from pygae/pypi
Browse files Browse the repository at this point in the history
Set up pypi publish with trusted-publishing
  • Loading branch information
utensil authored Apr 1, 2024
2 parents 25d432e + b8ae6c3 commit 716617a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ jobs:
&& !contains(github.event.head_commit.message, '[skip ci]')
&& !contains(github.event.head_commit.message, '[no release]')
runs-on: ubuntu-latest
# https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/galgebra
steps:
- name: Check out code
uses: actions/checkout@v3
Expand All @@ -79,12 +85,9 @@ jobs:
python-version: "3.11"
- name: Install wheel
run: |
python -m pip install wheel
- name: Build and upload package
if: success()
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
python -m pip install wheel packaging
- name: Build a binary wheel
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion galgebra/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# 1) we don't load dependencies by storing it in __init__.py
# 2) we can import it in setup.py for the same reason
# 3) we can import it into your module
__version__ = '0.5.0'
__version__ = '0.5.1'

0 comments on commit 716617a

Please sign in to comment.