From 12f81cb050e03624d058c3c44ea0fabf06d2c8e6 Mon Sep 17 00:00:00 2001 From: simw Date: Thu, 2 Nov 2023 14:43:02 +0000 Subject: [PATCH] Update deployment to use github pypi publishing action --- .github/workflows/publish.yml | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3390f50..98c25e8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,10 +30,10 @@ jobs: - run: poetry config virtualenvs.in-project true - run: make test - deploy: + build: needs: - - test - - lint + - test + - lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -41,14 +41,29 @@ jobs: with: python-version: "3.11" - run: curl -sSL https://install.python-poetry.org | python - -y - - name: check GITHUB_REF matches package version uses: samuelcolvin/check-python-version@v3 with: version_file_path: src/pydantic_to_pyarrow/__init__.py - - run: make package - - name: upload to pypi - run: poetry publish - env: - POETRY_PYPI_TOKEN_PYPI: ${{ secrets.pypi_token }} + - uses: actions/upload-artifact@v3 + with: + path: dist/* + name: package + + pypi-publish: + needs: + - build + name: upload release to PyPI + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v3 + with: + name: package + path: dist + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1