WIP github action to publish to PyPi #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & publish to pypi | |
on: | |
push: | |
branches: | |
- feat/uv | |
# release: | |
# types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
run: curl -LsSf https://astral.sh/uv/0.3.0/install.sh | sh | |
- name: Set up Python 3.10 | |
run: uv python install 3.10 | |
- name: Build package | |
run: uvx --from build pyproject-build --installer uv | |
- name: Publish package | |
run: uvx twine upload -r testpypi -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} dist/* --non-interactive | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-python@v4 | |
# with: | |
# python-version: "3.10" | |
# - uses: abatilo/actions-poetry@v2 | |
# - run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | |
# - name: Publish package | |
# run: poetry publish --build | |
# For testing locally, replace pypi with testpypi | |
# - run: poetry config repositories.testpypi https://test.pypi.org/legacy/ | |
# - run: poetry config pypi-token.testpypi ${{ secrets.PYPI_API_TOKEN }} | |
# - name: Publish package | |
# run: poetry publish --build -r testpypi |