From 9c9a248287cc5c847e5d135c00d5500b7bc2a37d Mon Sep 17 00:00:00 2001 From: David Peckham Date: Thu, 1 Feb 2024 01:07:54 -0500 Subject: [PATCH] renamed publish as release --- .github/workflows/{publish.yaml => release.yaml} | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) rename .github/workflows/{publish.yaml => release.yaml} (63%) diff --git a/.github/workflows/publish.yaml b/.github/workflows/release.yaml similarity index 63% rename from .github/workflows/publish.yaml rename to .github/workflows/release.yaml index 9da286a..7a9daa8 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/release.yaml @@ -1,13 +1,17 @@ -name: publish +name: release on: push: tags: ["*"] jobs: - deploy: + pypi-publish: + name: upload release to PyPI runs-on: ubuntu-latest environment: release + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write steps: - uses: actions/checkout@v4.1.1 - name: Set up Python @@ -21,9 +25,8 @@ jobs: pip install hatch-vcs pip install hatch-fancy-pypi-readme - name: Build and publish - env: - HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }} - HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }} run: | hatch build - hatch publish + # hatch publish + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file