From b7e6151686d8813eea1181d86d1500a44ddcdc99 Mon Sep 17 00:00:00 2001 From: Yann Kaiser Date: Mon, 17 Jul 2023 23:57:57 -0700 Subject: [PATCH] Switch to common delivery workflow (#30) --- .github/workflows/cd.yml | 16 ++++++++++ .github/workflows/deploy-pypi.yaml | 51 ------------------------------ 2 files changed, 16 insertions(+), 51 deletions(-) create mode 100644 .github/workflows/cd.yml delete mode 100644 .github/workflows/deploy-pypi.yaml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..bb244ff --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,16 @@ +name: Publish Python package to PyPI + +on: + push: + tags: + - v[0-9]* + release: + types: + - published + +jobs: + python-ci: + uses: epsy/python-workflows/.github/workflows/python-cd.yaml@main + secrets: + TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }} + PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/deploy-pypi.yaml b/.github/workflows/deploy-pypi.yaml deleted file mode 100644 index 356a693..0000000 --- a/.github/workflows/deploy-pypi.yaml +++ /dev/null @@ -1,51 +0,0 @@ -name: Publish Python package to PyPI - -on: - push: - tags: - - v[0-9]* - release: - types: - - published - -jobs: - build-publish: - name: Build and publish Python package - runs-on: ubuntu-18.04 - steps: - - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - uses: actions/setup-python@v1 - with: - python-version: 3.9 - - - name: Install pypa/build - run: >- - python -m - pip install - build - --user - - - name: Build a wheel and source distribution - run: >- - python -m - build - --sdist - --wheel - --outdir dist/ - - - name: Publish to TestPyPI - if: ${{ github.event.action != 'published' }} - uses: pypa/gh-action-pypi-publish@717ba43cfbb0387f6ce311b169a825772f54d295 - with: - repository_url: https://test.pypi.org/legacy/ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - - - name: Publish to PyPI - if: ${{ github.event.action == 'published' }} - uses: pypa/gh-action-pypi-publish@717ba43cfbb0387f6ce311b169a825772f54d295 - with: - password: ${{ secrets.PYPI_API_TOKEN }}