Prowler 4.3.4 - The Alchemist [YANKED] #92
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pypi-release | |
on: | |
release: | |
types: [published] | |
env: | |
RELEASE_TAG: ${{ github.event.release.tag_name }} | |
PYTHON_VERSION: 3.11 | |
CACHE: "poetry" | |
# TODO: create a bot user for this kind of tasks, like prowler-bot | |
GIT_COMMITTER_EMAIL: "[email protected]" | |
jobs: | |
release-prowler-job: | |
runs-on: ubuntu-latest | |
env: | |
POETRY_VIRTUALENVS_CREATE: "false" | |
name: Release Prowler to PyPI | |
steps: | |
- name: Get Prowler version | |
run: | | |
PROWLER_VERSION="${{ env.RELEASE_TAG }}" | |
case ${PROWLER_VERSION%%.*} in | |
3) | |
echo "Releasing Prowler v3 with tag ${PROWLER_VERSION}" | |
;; | |
4) | |
echo "Releasing Prowler v4 with tag ${PROWLER_VERSION}" | |
;; | |
*) | |
echo "Releasing another Prowler major version, aborting..." | |
exit 1 | |
;; | |
esac | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
pipx install poetry | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: ${{ env.CACHE }} | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Build Prowler package | |
run: | | |
poetry build | |
- name: Publish Prowler package to PyPI | |
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 |