OpenConceptLab/ocl_issues#1909 | removed comments #26
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: Build | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python setup.py install | |
pip install six | |
- name: Unittest | |
run: | | |
python -m unittest ocldev/tests/*.py | |
pypi-publish: | |
needs: [test] | |
name: Publish to PyPi | |
runs-on: ubuntu-latest | |
environment: pypi | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip --user | |
pip install wheel | |
pip install setuptools==44.1.0 --user | |
pip install twine==1.15.0 --user | |
- name: Build Wheel | |
run: | | |
python setup.py sdist bdist_wheel --universal | |
twine check dist/* | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |