Skip to content

Commit

Permalink
First upload to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainv committed May 23, 2024
1 parent 0580685 commit b199429
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions .github/workflows/wheel-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

name: Build wheel and upload to PyPI

# Publish when a (published) GitHub Release is created
# When pushing with a tag (i.e. new version)
on:
push:
tags:
- "v*"
- "*"

jobs:

Expand Down Expand Up @@ -92,22 +92,38 @@ jobs:
- name: Check dist
run: |
twine check dist/*
upload_pypi:
name: Upload to PyPI
needs: [check-current-branch, build_wheels, build_sdist]
needs: [dist_check]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: contains(${{ needs.check.outputs.branch }}, 'main')
environment:
name: pypi
url: https://pypi.org/p/geefcc
permissions:
id-token: write # Mandatory for trusted publishing.
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}

# upload_pypi:
# name: Upload to PyPI
# needs: [check-current-branch, build_wheels, build_sdist]
# runs-on: ubuntu-latest
# if: contains(${{ needs.check.outputs.branch }}, 'main')
# environment:
# name: pypi
# url: https://pypi.org/p/geefcc
# permissions:
# id-token: write # Mandatory for trusted publishing.
# steps:
# - uses: actions/download-artifact@v3
# with:
# name: artifact
# path: dist
# - uses: pypa/gh-action-pypi-publish@release/v1

# End

0 comments on commit b199429

Please sign in to comment.