Skip to content

Commit

Permalink
Add upload cmds to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewphilipsmith committed Dec 13, 2024
1 parent a9b39cb commit 2c17b97
Showing 1 changed file with 30 additions and 15 deletions.
45 changes: 30 additions & 15 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,33 @@ jobs:
name: wheels-sdist
path: dist

# TODO: uncomment for release to PyPI
# release:
# name: Release
# runs-on: ubuntu-latest
# if: "startsWith(github.ref, 'refs/tags/')"
# needs: [linux, musllinux, windows, macos, sdist]
# steps:
# - uses: actions/download-artifact@v4
# - name: Publish to PyPI
# uses: PyO3/maturin-action@v1
# env:
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
# with:
# command: upload
# args: --non-interactive --skip-existing wheels-*/*
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, musllinux, windows, macos, sdist]
environment: release
steps:
- uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*

publish_test:
name: Release
runs-on: ubuntu-latest
needs: [linux, musllinux, windows, macos, sdist]
environment: testpypi
steps:
- uses: actions/download-artifact@v4
- name: Publish to TestPyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/* --repository-url https://test.pypi.org/legacy/

0 comments on commit 2c17b97

Please sign in to comment.