From 8187788b2c438df3266454d1760ed82d579b2d61 Mon Sep 17 00:00:00 2001 From: Sergio Garcia <38561120+sergargar@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:16:53 +0100 Subject: [PATCH] fix(pypi-release.yml): create PR before replicating (#1986) --- .github/workflows/pypi-release.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 1f78c9da..885c3169 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -41,21 +41,11 @@ jobs: run: | poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} poetry publish - - name: Replicate PyPi Package - run: | - rm -rf ./dist && rm -rf ./build && rm -rf prowler.egg-info - pip install toml - python util/replicate_pypi_package.py - poetry build - - name: Publish prowler-cloud package to PyPI - run: | - poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} - poetry publish # Create pull request with new version - name: Create Pull Request uses: peter-evans/create-pull-request@v4 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.PROWLER_ACCESS_TOKEN }} commit-message: "chore(release): update Prowler Version to ${{ env.RELEASE_TAG }}." branch: release-${{ env.RELEASE_TAG }} labels: "status/waiting-for-revision, severity/low" @@ -68,3 +58,13 @@ jobs: ### License By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. + - name: Replicate PyPi Package + run: | + rm -rf ./dist && rm -rf ./build && rm -rf prowler.egg-info + pip install toml + python util/replicate_pypi_package.py + poetry build + - name: Publish prowler-cloud package to PyPI + run: | + poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} + poetry publish