Main #205
Workflow file for this run
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: Main | |
| on: push | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Lint JS Code | |
| uses: qtoggle/actions-common/actions/lint-js@v1 | |
| - name: Lint Python Code | |
| uses: qtoggle/actions-common/actions/lint-python@v1 | |
| with: | |
| source-dir: qui | |
| jsdoc: | |
| name: Publish Docs | |
| if: startsWith(github.ref, 'refs/tags/version-') | |
| runs-on: ubuntu-latest | |
| needs: | |
| - lint | |
| steps: | |
| - name: Source code checkout | |
| uses: actions/checkout@v4 | |
| - name: Replace source version | |
| uses: qtoggle/actions-common/actions/replace-source-version@v1 | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - name: Install | |
| run: | | |
| npm install && rm -rf docs/* js/lib/* && npx jsdoc -c jsdoc.conf.json | |
| - name: Deploy GitHub pages | |
| uses: JamesIves/github-pages-deploy-action@releases/v3 | |
| with: | |
| ACCESS_TOKEN: ${{ secrets.GH_PAGES_ACCESS_TOKEN }} | |
| BRANCH: gh-pages | |
| FOLDER: docs | |
| build-python: | |
| name: Build Python | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Build Python package | |
| uses: qtoggle/actions-common/actions/build-python-package@v1 | |
| publish: | |
| name: Publish | |
| if: startsWith(github.ref, 'refs/tags/version-') | |
| runs-on: ubuntu-latest | |
| needs: | |
| - lint | |
| - jsdoc | |
| - build-python | |
| steps: | |
| - name: Source code checkout | |
| uses: actions/checkout@v4 | |
| - name: Replace source version | |
| uses: qtoggle/actions-common/actions/replace-source-version@v1 | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - name: Publish to NPM | |
| run: npm publish | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Fetch python dist folder | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-package-dist | |
| path: dist/ | |
| - name: Publish package | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_TOKEN }} |