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