Build #78
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: main | |
pull_request: | |
branches: '*' | |
workflow_dispatch: | |
inputs: | |
publish-release: | |
description: "Production Release" | |
required: false | |
type: boolean | |
default: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Base Setup | |
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Install dependencies | |
run: | | |
python -m pip install -U "jupyterlab>=4.0.0,<5" | |
python -m pip install -U "build" | |
- name: Lint the extension | |
run: | | |
set -eux | |
jlpm | |
jlpm run lint:check | |
- name: Test the extension | |
run: | | |
set -eux | |
jlpm run test | |
- name: Build the extension | |
run: | | |
set -eux | |
jlpm | |
jlpm clean:all | |
git clean -dfX | |
sed -i 's/"@quarto\/jupyterlab-quarto"/"jupyterlab-quarto"/g' package.json | |
python -m build | |
sed -i 's/"jupyterlab-quarto"/"@quarto\/jupyterlab-quarto"/g' package.json | |
- name: Publish package distributions to TestPyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: ${{ ! inputs.publish-release }} | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: ${{ inputs.publish-release }} | |
- name: Build the NPM Front End | |
run: | | |
jlpm clean:all && git clean -dfX | |
jlpm && jlpm build:prod | |
- uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
if: ${{ inputs.publish-release }} |