Fix PyPi release action #9
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] | |
pull_request: | |
branches: | |
- main | |
jobs: | |
pypi: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: python3 -m pip install --upgrade pybind11 setuptools wheel | |
- name: Compile project | |
run: python3 -m pip install -e . | |
- name: Build distribution package | |
run: python3 setup.py sdist bdist_wheel | |
- name: Publish distribution 📦 to PyPI, if release | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password_farm_ng_core }} | |
if: github.event_name == 'release' && github.event.action == 'published' |