diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index d36fd7d2c..09deb7108 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -2,15 +2,19 @@ name: Publish to PyPI on: release: - types: [released] + types: [ released ] + pull_request: + workflow_dispatch: jobs: publish: - uses: spacetelescope/action-publish_to_pypi/.github/workflows/workflow.yml@master + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1 with: - test: false - build_platform_wheels: true # Set to true if your package contains a C extension + upload_to_pypi: ${{ github.event_name == 'released'}} + targets: | + - linux + - macos + sdist: true secrets: - user: ${{ secrets.PYPI_USERNAME_STSCI_MAINTAINER }} - password: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }} # WARNING: Do not hardcode secret values here! If you want to use a different user or password, you can override this secret by creating one with the same name in your Github repository settings. - test_password: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER_TEST }} + pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }} +