feat(pypi): replicate PyPi package (#1727)

Co-authored-by: sergargar <sergio@verica.io>
This commit is contained in:
Sergio Garcia
2023-01-17 17:53:08 +01:00
committed by GitHub
parent 9ad2f33dd8
commit 52d65ee4e8
2 changed files with 21 additions and 4 deletions

View File

@@ -23,12 +23,19 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build --upgrade
#- name: Set version number
# run: python update_prowler_version.py ${{ env.VERSION }}
pip install build toml --upgrade
- name: Build package
run: python -m build
- name: Publish package to PyPI
- name: Publish prowler-cloud package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Replicate PyPi Package
run: |
rm -rf ./dist && rm -rf ./build && rm -rf prowler_cloud.egg-info
python util/replicate_pypi_package.py
python -m build
- name: Publish prowler package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

View File

@@ -0,0 +1,10 @@
import toml
data = toml.load("pyproject.toml")
# Modify field
data["project"]["name"] = "prowler"
# To use the dump function, you need to open the file in 'write' mode
f = open("pyproject.toml", "w")
toml.dump(data, f)
f.close()