Build Project #68
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: Build Project | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| - main | |
| paths-ignore: | |
| # Changes involving the following path files will not trigger the workflow | |
| # 涉及以下路径文件的更改不会触发工作流 | |
| - LICENSE.txt | |
| - README.md | |
| - README_EN.md | |
| - docs/** | |
| pull_request: | |
| branches: | |
| - dev | |
| - main | |
| paths-ignore: | |
| # Changes involving the following path files will not trigger the workflow | |
| # 涉及以下路径文件的更改不会触发工作流 | |
| - LICENSE.txt | |
| - README.md | |
| - README_EN.md | |
| - docs/** | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| node: [lts/*, lts/-1] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set node ${{ matrix.node }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Install JetV-ui dependencies | |
| run: pnpm ui:install | |
| - name: Build JetV-ui | |
| run: pnpm ui:build | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm run lint | |
| - name: Type check | |
| run: pnpm run typecheck | |
| - name: Build the project | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| run: pnpm build | |
| - name: Upload Windows Installer | |
| if: matrix.node == 'lts/*' && matrix.os == 'windows-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-installer | |
| path: build/*Setup*.exe | |
| - name: Upload macOS Installer | |
| if: matrix.node == 'lts/*' && matrix.os == 'macos-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mac-installer | |
| path: build/*.dmg | |
| - name: Upload Linux Installer | |
| if: matrix.node == 'lts/*' && matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-installer | |
| path: build/*.AppImage |