diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..12215c1 --- /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/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml deleted file mode 100644 index 5585871..0000000 --- a/.github/workflows/publish-to-pypi.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Publish to PyPI - -on: - release: - types: [released] - -jobs: - build: - name: Publish release to PyPI - env: - PYPI_USERNAME_STSCI_MAINTAINER: ${{ secrets.PYPI_USERNAME_STSCI_MAINTAINER }} - PYPI_PASSWORD_STSCI_MAINTAINER: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }} - PYPI_USERNAME_OVERRIDE: ${{ secrets.PYPI_USERNAME_OVERRIDE }} - PYPI_PASSWORD_OVERRIDE: ${{ secrets.PYPI_PASSWORD_OVERRIDE }} - PYPI_TEST: ${{ secrets.PYPI_TEST }} - INDEX_URL_OVERRIDE: ${{ secrets.INDEX_URL_OVERRIDE }} - runs-on: ubuntu-latest - steps: - - # Check out the commit containing this workflow file. - - name: checkout repo - uses: actions/checkout@v2 - - - name: custom action - uses: spacetelescope/action-publish_to_pypi@master - id: custom_action_0