Skip to content

Commit

Permalink
Update deployment to use github pypi publishing action
Browse files Browse the repository at this point in the history
  • Loading branch information
simw committed Nov 2, 2023
1 parent ac4c9ab commit 12f81cb
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,40 @@ 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
- uses: actions/setup-python@v4
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

0 comments on commit 12f81cb

Please sign in to comment.