From 5e5d39255d23bf57c5031f91d5dcc3c33e43724d Mon Sep 17 00:00:00 2001 From: Zoe <13400804+zoe-icu@users.noreply.github.com> Date: Thu, 9 Jul 2026 14:33:25 +0800 Subject: [PATCH] fix(ci): auto-set version from tag and use API token for PyPI publish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extract version from tag name (e.g. apitable.py@1.5.0 → 1.5.0) so pyproject.toml no longer needs manual version bumps before release. Reverts to username/password auth since we don't have PyPI trusted publisher access. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/py-deploy.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/py-deploy.yml b/.github/workflows/py-deploy.yml index d7222aa..52a3570 100644 --- a/.github/workflows/py-deploy.yml +++ b/.github/workflows/py-deploy.yml @@ -2,7 +2,6 @@ name: Python Publish Package on: push: - paths: "apitable.py/pyproject.toml" tags: - "apitable.py@*" @@ -13,17 +12,19 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: 3.10.12 + python-version: "3.10" - name: Python Poetry uses: abatilo/actions-poetry@v2 with: - working-directory: ./apitable.py poetry-version: 1.5.1 - name: Build and publish env: PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | + VERSION="${GITHUB_REF_NAME#apitable.py@}" cd apitable.py - make install + poetry version "$VERSION" + poetry lock --no-update + poetry install poetry publish --username=$PYPI_USERNAME --password=$PYPI_PASSWORD --build