feat: update to Typescript v6 to match quantinuum-ui #36
This file contains hidden or 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: Pre Release library | |
| on: | |
| push: | |
| branches: | |
| - '*' # matches every branch that doesn't contain a '/' | |
| - '*/*' # matches every branch containing a single '/' | |
| - '**' # matches every branch | |
| - '!main' # excludes main | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: 'npm' | |
| # Path to the lock file needs to be specified explicitly as it is not in the root of the repository | |
| cache-dependency-path: 'documentation-ui/package-lock.json' | |
| - name: Lint documentation UI JS package | |
| working-directory: documentation-ui | |
| run: | | |
| npm ci | |
| npm run lint | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| # Path to the lock file needs to be specified explicitly as it is not in the root of the repository | |
| cache-dependency-path: 'documentation-ui/package-lock.json' | |
| - name: Build documentation UI JS package | |
| working-directory: documentation-ui | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Upload documentation UI dist artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: documentation-ui-dist | |
| path: documentation-ui/dist | |
| if-no-files-found: error | |
| build_sphinx: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install poetry | |
| run: pipx install poetry | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: 'poetry' | |
| cache-dependency-path: 'sphinx-ui/pyproject.toml' | |
| - name: Set up Node.js for UI Assets | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: 'npm' | |
| cache-dependency-path: 'sphinx-ui/react/package-lock.json' | |
| - name: Download documentation UI dist artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: documentation-ui-dist | |
| path: documentation-ui/dist | |
| - name: Generate UI Assets | |
| working-directory: sphinx-ui/react | |
| run: | | |
| echo "🔨 Generating UI assets..." | |
| npm update @quantinuum/documentation-ui | |
| npm install | |
| npm run build | |
| cp ./build/injectNav.global.js ../quantinuum_sphinx/static/injectNav.global.js | |
| cp ./build/syncTheme.global.js ../quantinuum_sphinx/static/syncTheme.global.js | |
| cp ./node_modules/@quantinuum/quantinuum-ui/dist/tokens.css ../quantinuum_sphinx/static/styles/quantinuum-ui-tokens.css | |
| npx tailwindcss --postcss ./postcss.config.cjs -i ./index.css -o ../quantinuum_sphinx/static/styles/quantinuum-ui-tailwind.css | |
| echo ✅ "Done. Generated UI assets." | |
| - name: Build | |
| working-directory: sphinx-ui | |
| run: | | |
| echo "📦 Building..." | |
| poetry config http-basic.pypi_local ${{ secrets.PYPI_USERNAME }} ${{ secrets.PYPI_API_TOKEN }} | |
| poetry build | |
| echo ✅ "Done." |