diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d5ad5c5..36c9e2f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,13 +6,15 @@ on: - created jobs: - release: - name: release + pypi-publish: + name: upload release to PyPI runs-on: ubuntu-latest - if: ${{ github.repository }} == 'stac-utils/stac-geoparquet' + # Specifying a GitHub environment is optional, but strongly encouraged + # environment: release + permissions: + id-token: write steps: - - uses: actions/checkout@v2 - + # retrieve your distributions here - name: Set up Python 3.x uses: actions/setup-python@v2 with: @@ -21,12 +23,11 @@ jobs: - name: Install release dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine build + python -m pip install build - - name: Build and publish package - env: - TWINE_USERNAME: "__token__" - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + - name: Build package run: | python -m build - twine upload dist/* \ No newline at end of file + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file