diff --git a/.github/workflows/build-lint-push-containers.yml b/.github/workflows/build-lint-push-containers.yml index 13df60a026d..eda088f1409 100644 --- a/.github/workflows/build-lint-push-containers.yml +++ b/.github/workflows/build-lint-push-containers.yml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest outputs: prowler_version_major: ${{ steps.get-prowler-version.outputs.PROWLER_VERSION_MAJOR }} - prowler_version: ${{ steps.update-prowler-version.outputs.PROWLER_VERSION }} + prowler_version: ${{ steps.get-prowler-version.outputs.PROWLER_VERSION }} env: POETRY_VIRTUALENVS_CREATE: "false" @@ -65,6 +65,8 @@ jobs: id: get-prowler-version run: | PROWLER_VERSION="$(poetry version -s 2>/dev/null)" + echo "PROWLER_VERSION=${PROWLER_VERSION}" >> "${GITHUB_ENV}" + echo "PROWLER_VERSION=${PROWLER_VERSION}" >> "${GITHUB_OUTPUT}" # Store prowler version major just for the release PROWLER_VERSION_MAJOR="${PROWLER_VERSION%%.*}" @@ -89,15 +91,6 @@ jobs: ;; esac - - name: Update Prowler version (release) - id: update-prowler-version - if: github.event_name == 'release' - run: | - PROWLER_VERSION="${{ github.event.release.tag_name }}" - poetry version "${PROWLER_VERSION}" - echo "PROWLER_VERSION=${PROWLER_VERSION}" >> "${GITHUB_ENV}" - echo "PROWLER_VERSION=${PROWLER_VERSION}" >> "${GITHUB_OUTPUT}" - - name: Login to DockerHub uses: docker/login-action@v3 with: diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index ba7994903c2..8be0acd1966 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -40,7 +40,6 @@ jobs: - name: Install dependencies run: | pipx install poetry - pipx inject poetry poetry-bumpversion - name: Setup Python uses: actions/setup-python@v5 @@ -48,10 +47,6 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} cache: ${{ env.CACHE }} - - name: Update Poetry and config version - run: | - poetry version ${{ env.RELEASE_TAG }} - - name: Import GPG key uses: crazy-max/ghaction-import-gpg@v6 with: @@ -60,22 +55,6 @@ jobs: git_user_signingkey: true git_commit_gpgsign: true - - name: Push updated version to the release tag - run: | - # Configure Git - git config user.name "github-actions" - git config user.email "${{ env.GIT_COMMITTER_EMAIL }}" - - # Add the files with the version changed - git add prowler/config/config.py pyproject.toml - git commit -m "chore(release): ${{ env.RELEASE_TAG }}" --no-verify -S - - # Replace the tag with the version updated - git tag -fa ${{ env.RELEASE_TAG }} -m "chore(release): ${{ env.RELEASE_TAG }}" --sign - - # Push the tag - git push -f origin ${{ env.RELEASE_TAG }} - - name: Build Prowler package run: | poetry build