From 94abeb1f3ac3b2b878c59c6bd10a793aaf497b20 Mon Sep 17 00:00:00 2001 From: Matt Copperwaite Date: Thu, 7 Nov 2024 11:24:26 +0000 Subject: [PATCH] update publish to use rye --- .github/workflows/publish.yml | 43 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9125ee6..d03c412 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,25 +9,24 @@ on: jobs: publish: - name: Publish to PyPI - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install CA certs - run: sudo apt-get install ca-certificates -y - - name: Get tag - id: tag - uses: dawidd6/action-get-tag@v1 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.8" - - name: Publish to PyPI - run: | - TAG="${{steps.tag.outputs.tag}}" - echo "__version__ = \"${TAG:1}\"" >> ${{ env.name }}/__init__.py - python3 -m pip install setuptools==58.5.3 twine==3.6.0 wheel==0.35.1 flit==3.4.0 - python3 -m flit publish - env: - FLIT_USERNAME: __token__ - FLIT_PASSWORD: ${{ secrets.PYPI_API }} + name: Publish to PyPI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install CA certs + run: sudo apt-get install ca-certificates -y + - name: Get tag + id: tag + uses: dawidd6/action-get-tag@v1 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - uses: eifinger/setup-rye@v4 + - name: Publish to PyPI + run: | + rye build + rye publish --yes + env: + FLIT_USERNAME: __token__ + FLIT_PASSWORD: ${{ secrets.PYPI_API }}