Use a separate Jinja env per extension #721
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 Python package (and upload to PyPI on tags) | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
cache-dependency-path: "constraints*.txt" | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "lts/*" | |
cache: "npm" | |
cache-dependency-path: frontend/package-lock.json | |
- run: python -m pip install -c constraints.txt tox twine | |
- run: cd frontend && npm ci | |
- run: cd frontend && npm run build | |
- run: tox -e build-dist | |
- name: Publish release | |
if: github.event_name == 'push' && github.ref_type == 'tag' | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: python -m twine upload dist/* |