Skip to content

Commit

Permalink
Update python-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuzu-Typ committed Nov 6, 2024
1 parent c0d30fe commit 36c91f3
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ name: Publish assimp-py to PyPI

on:
workflow_dispatch:
inputs:
pypi_target:
description: 'Deploy to Production or Test PyPI'
required: true
default: 'production'
type: choice
options:
- production
- test

release:
types: [released]
types: [published]

env:
CIBW_BUILD: cp3*
Expand Down Expand Up @@ -182,12 +192,17 @@ jobs:
merge-multiple: true
path: dist

- uses: pypa/[email protected]
- name: Publish to Production PyPI
if: ${{ (github.event_name == 'workflow_dispatch' && inputs.pypi_target == 'production') || (github.event_name == 'release' && !github.event.release.prerelease) }}
uses: pypa/[email protected]
with:
user: __token__
# Uncomment to publish to production PyPI:
# password: ${{ secrets.pypi_password }}
password: ${{ secrets.PYPI_TOKEN }}

# Uncomment to publish to test PyPI (https://test.pypi.org):
password: ${{ secrets.testpypi_password }}
- name: Publish to Test PyPI
if: ${{ (github.event_name == 'workflow_dispatch' && inputs.pypi_target == 'test') || (github.event_name == 'release' && github.event.release.prerelease) }}
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository-url: https://test.pypi.org/legacy/

0 comments on commit 36c91f3

Please sign in to comment.