diff --git a/.github/workflows/py-deploy.yml b/.github/workflows/py-deploy.yml index 766ab97..52a3570 100644 --- a/.github/workflows/py-deploy.yml +++ b/.github/workflows/py-deploy.yml @@ -8,8 +8,6 @@ on: jobs: publish: runs-on: ubuntu-latest - permissions: - id-token: write steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 @@ -19,13 +17,14 @@ jobs: uses: abatilo/actions-poetry@v2 with: poetry-version: 1.5.1 - - name: Build + - 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 + poetry version "$VERSION" poetry lock --no-update poetry install - poetry build - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: apitable.py/dist/ + poetry publish --username=$PYPI_USERNAME --password=$PYPI_PASSWORD --build