diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index d2c285d..b1e08ff 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -25,3 +25,10 @@ jobs: - macos: py310-test-pytest73 - windows: py311-test-pytest74 - linux: py311-test-pytestdev + publish: + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 + with: + test_extras: test + test_command: pytest $GITHUB_WORKSPACE/tests; pytest --arraydiff $GITHUB_WORKSPACE/tests + secrets: + pypi_token: ${{ secrets.pypi_password }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 2631bf7..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Release - -on: - pull_request: - push: - tags: - - '*' - -jobs: - build-n-publish: - name: Build and publish Python 🐍 distributions 📦 to PyPI - runs-on: ubuntu-latest - if: ((github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || contains(github.event.pull_request.labels.*.name, 'Build wheels')) - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - - name: Install python-build and twine - run: python -m pip install pip build "twine>=3.3" -U - - - name: Build package - run: python -m build --sdist --wheel . - - - name: List result - run: ls -l dist - - - name: Check long_description - run: python -m twine check --strict dist/* - - # FIXME: pytest not found - #- name: Test package - # run: | - # cd .. - # python -m venv testenv - # testenv/bin/pip install pytest pytest-arraydiff/dist/*.whl - # testenv/bin/pytest pytest-arraydiff/tests --arraydiff - - - name: Publish distribution 📦 to PyPI - if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.pypi_password }}