trying publish-to-pypi #72
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Building & Publishing | |
on: | |
push: | |
branches: | |
- pypi-publish-workflow | |
tags: | |
- "v*" | |
permissions: | |
contents: read | |
jobs: | |
# Release to PyPI after a RELEASE gets PUBLISHED in @spacetelescope/astrocut/main | |
publish-to-pypi: | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 | |
name: Publish to PyPI | |
# We only want to upload to PyPI after a new release has been published on the @spacetelescope/astrocut repo | |
if: github.repository_owner == 'spacetelescope' && github.event_name == 'push' | |
with: | |
test_extras: test | |
test_command: pytest --pyargs astrocut | |
# jobs: | |
# pypi-publish: | |
# name: Upload release to PyPI | |
# runs-on: ubuntu-latest | |
# environment: | |
# name: pypi | |
# url: https://pypi.org/p/astrocut | |
# permissions: | |
# id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
# steps: | |
# # retrieve your distributions here | |
# - name: Publish package distributions to PyPI | |
# uses: pypa/gh-action-pypi-publish@release/v1 |