0.2.9.2 #71
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: Build and Publish | |
on: | |
release: | |
types: [published] | |
jobs: | |
build_pyquibbler: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./pyquibbler | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install setuptools wheel twine | |
- name: Build wheel | |
run: python -m pip wheel . -w ./dist --no-deps | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: pyquibbler | |
path: ./pyquibbler/dist/*.whl | |
build_extension: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./pyquibbler-labextension | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/setup-python@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools | |
python -m pip install jupyterlab==3.1 wheel | |
- name: Install Node.js Dependencies | |
run: npm install | |
- name: Install Playwright Browsers | |
run: npx playwright install | |
- name: Build the extension | |
run: | | |
set -eux | |
python -m pip install . | |
echo "Listing Jupyter Lab Extensions" | |
jupyter labextension list | |
echo "Running Browser Check" | |
python -m jupyterlab.browser_check | |
echo "Building Wheel" | |
python -m pip wheel . -w ./dist --no-deps | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pyquibbler_labextension | |
path: ./pyquibbler-labextension/dist/*.whl | |
publish: | |
needs: [build_pyquibbler, build_extension] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
path: . | |
- name: Copy to dist | |
run: | | |
mkdir dist | |
cp -r pyquibbler/* dist/ | |
cp -r pyquibbler_labextension/* dist/ | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |