added pypi publish workflow (#450)

This commit is contained in:
danielsagi
2021-04-23 14:37:31 +03:00
committed by GitHub
parent 5745f4a32b
commit 599e9967e3

View File

@@ -8,8 +8,8 @@ env:
ALIAS: aquasecurity
REP: kube-hunter
jobs:
publish:
name: Publish
dockerhub:
name: Publish To Docker Hub
runs-on: ubuntu-18.04
steps:
- name: Check Out Repo
@@ -63,3 +63,32 @@ jobs:
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
pypi:
name: Publish To PyPI
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -r requirements-dev.txt
- name: Build project
shell: bash
run: |
python -m pip install wheel
make build
- name: Publish distribution package to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}