From 41fdcdb2b4d992887bd4e030949bed3911daa3eb Mon Sep 17 00:00:00 2001 From: Ali Zahedigol Date: Thu, 28 Mar 2024 12:16:38 +0200 Subject: [PATCH] fix: add hotfix for pypi publish --- .github/workflows/release.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 830cf6c..9ba056c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,8 +14,6 @@ jobs: runs-on: ubuntu-latest outputs: version: ${{ steps.set_output.outputs.version }} - permissions: - id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - name: Checkout Code uses: actions/checkout@v3 @@ -46,6 +44,16 @@ jobs: run: | echo "$NEW_TAG" sed -i "s/__version__ = \"1.0.0\"/__version__ = \"$NEW_TAG\"/g" azbankgateways/__init__.py + + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/az-iranian-bank-gateways/ + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + steps: - name: Build package uses: actions/setup-python@v4 with: @@ -54,6 +62,5 @@ jobs: run: python -m pip install build - name: Build dist run: python -m build - - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@v1.8.14 + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1