From bc2096f1a39193c20895ee9799c9f9d73d61e923 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 2 Oct 2023 10:53:12 -0400 Subject: [PATCH] use PyPI upload workflow from OpenAstronomy --- .github/workflows/build.yml | 15 +++++++++++++++ .github/workflows/ci.yml | 1 - .github/workflows/publish-to-pypi.yml | 16 ---------------- 3 files changed, 15 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/publish-to-pypi.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..12215c1f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,15 @@ +name: build + +on: + release: + types: [ released ] + pull_request: + workflow_dispatch: + +jobs: + build: + 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_STSCI_MAINTAINER }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 133b6009..b75e3d74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,6 @@ jobs: envs: | - linux: check-style - linux: check-security - - linux: check-build test: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main with: diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml deleted file mode 100644 index 9479c114..00000000 --- a/.github/workflows/publish-to-pypi.yml +++ /dev/null @@ -1,16 +0,0 @@ -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_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 }}'