diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..9479373a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +name: build + +on: + release: + types: [ released ] + pull_request: + workflow_dispatch: + +jobs: + build: + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1 + with: + upload_to_pypi: ${{ (github.event_name == 'release') && (github.event.action == 'released') }} + targets: | + - cp3?-manylinux_x86_64 + - cp3?-macosx_x86_64 + sdist: true + 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 d36fd7d2..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: true # 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 }} diff --git a/pyproject.toml b/pyproject.toml index c336af4d..cf6338ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,3 +90,9 @@ exclude = [ '.tox', '.eggs', ] + +[tool.cibuildwheel.macos] +archs = ["x86_64", "arm64"] + +[tool.cibuildwheel.linux] +archs = ["auto", "aarch64"] \ No newline at end of file