-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1389 from larrybradley/publish-workflow
Add publish workflow
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Wheel building | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
|
||
build_and_publish: | ||
# This job builds the wheels and publishes them to PyPI for all | ||
# tags, except those ending in ".dev". For PRs with the "Build all | ||
# wheels" label, wheels are built, but are not uploaded to PyPI. | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1 | ||
|
||
if: (github.repository == 'astropy/photutils' && (github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Build all wheels'))) | ||
with: | ||
test_extras: test | ||
test_command: pytest -p no:warnings --pyargs photutils | ||
targets: | | ||
# Linux wheels | ||
- cp310-manylinux_x86_64 | ||
# We upload to PyPI for all tags, except those ending in .dev | ||
upload_to_pypi: ${{ startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, '.dev') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }} | ||
repository_url: https://test.pypi.org/legacy/ # temporary | ||
|
||
secrets: | ||
pypi_token: ${{ secrets.pypi_test_token }} |