diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..c6d7f8d --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,29 @@ +name: PyPI + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: "3.9" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Remove existing packages + run: rm -rf ./dist/ ./anonip.egg-info/ ./build/ + - name: Run twine + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + TWINE_NON_INTERACTIVE: true + run: | + python setup.py sdist bdist_wheel + twine upload dist/*