diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-pypi.yml similarity index 84% rename from .github/workflows/publish-to-test-pypi.yml rename to .github/workflows/publish-to-pypi.yml index f50a6f7..e4bb1df 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -14,27 +14,35 @@ on: branches: - '**' +permissions: + contents: read + id-token: write + jobs: build-n-publish: name: Build and publish Python distributions to PyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: fetch-depth: 0 + - run: | git fetch origin +refs/tags/*:refs/tags/* - - name: Set up Python 3.7 + + - name: Set up Python 3.8 uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 + - name: Install pep517 run: >- python -m pip install pep517 --user + - name: Build a binary wheel and a source tarball run: >- python -m @@ -42,8 +50,10 @@ jobs: --binary --out-dir dist/ . + - name: Publish distribution to PyPI if: startsWith(github.event.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.pypi_password }} + packages-dir: dist/ + skip-existing: true