Skip to content

Commit

Permalink
WIP github action to publish to PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
ggozad committed Aug 21, 2024
1 parent c45bc8c commit 4ab2d98
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
name: Build & publish to pypi
on:
release:
types: [published]
push:
branches:
- feat/uv
# release:
# types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- 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 }}
- 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: poetry publish --build
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 }}
Expand Down

0 comments on commit 4ab2d98

Please sign in to comment.