Skip to content

Commit

Permalink
Fix for pypi upload (#74)
Browse files Browse the repository at this point in the history
* Fixed python publishing
  • Loading branch information
dchansen authored Apr 24, 2024
1 parent 25e98e5 commit 44ccc63
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

jobs:
build-n-publish:
build:
name: Build and publish Python 🐍 distributions πŸ“¦ to PyPI and TestPyPI
runs-on: ubuntu-20.04
steps:
Expand All @@ -30,8 +30,29 @@ jobs:
--wheel
--outdir dist/
.
- name: Publish distribution πŸ“¦ to PyPI
#if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
password: ${{ secrets.PYPI_API_TOKEN }}
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution πŸ“¦ to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/ismrmrmd
permissions:
id-token: ${{ secrets.PYPI_API_TOKEN }}
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution πŸ“¦ to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 44ccc63

Please sign in to comment.