Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use openastronomy github action for release #1761

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 14 additions & 16 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: Publish to PyPI

on:
release:
types: [released]

jobs:
publish:
uses: spacetelescope/action-publish_to_pypi/.github/workflows/workflow.yml@master
with:
test: false
build_platform_wheels: false # Set to true if your package contains a C extension
secrets:
user: ${{ secrets.PYPI_USERNAME_ASDF_MAINTAINER }}
password: ${{ secrets.PYPI_PASSWORD_ASDF_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_ASDF_MAINTAINER_TEST }}
name: build

on:
release:
types: [released]
workflow_dispatch:

Comment on lines +3 to +6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
on:
release:
types: [released]
workflow_dispatch:
on:
release:
types: [released]
pull_request:
workflow_dispatch:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

PRs are currently tested using the OpenAstronomy workflow in the package step:

package:
needs: [core, asdf-schemas]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1
with:
python-version: "3.11"
upload_to_pypi: false
upload_to_anaconda: false
test_extras: tests
test_command: pytest --pyargs asdf

I'll take a look at combining these in a follow-up PR.

jobs:
publish:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1
with:
upload_to_pypi: ${{ (github.event_name == 'release') && (github.event.action == 'released') }}
secrets:
pypi_token: ${{ secrets.PYPI_PASSWORD_ASDF_MAINTAINER }}
Loading