diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 68e357b46f..867428b5f0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,15 +7,21 @@ jobs: pypi: name: PyPI Release runs-on: ubuntu-latest + permissions: + id-token: write steps: - - uses: actions/checkout@v3 - - name: Remove docs before release - run: rm -rf docs/ - - name: PyPI Upload - uses: FeatureLabs/gh-action-pypi-upload@v2 - env: - PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} - PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - TEST_PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }} - TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} - TAG_NAME: ${{ github.event.release.tag_name }} + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: Install deps + run: | + python -m pip install --quiet --upgrade pip + python -m pip install --quiet --upgrade build + python -m pip install --quiet --upgrade setuptools + - name: Remove build artifacts and docs + run: | + rm -rf .eggs/ dist/ build/ docs/ + - name: Build distribution + run: python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + - name: Run workflow to create feedstock pull req