pypi publish #4
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
# This workflow builds the project and publishes it to PyPI. | |
# For authentication, trusted publishing has been enabled for this | |
# repository in PyPI. | |
name: pypi publish | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
pypi-publish: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/hisim | |
permissions: | |
id-token: write # this permission is mandatory for trusted publishing | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Setup Graphviz | |
uses: ts-graphviz/setup-graphviz@v1 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
pip install -e . | |
- name: Build distributables | |
run: python setup.py sdist bdist_wheel | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |