docs: 注解默认设置 #428
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: "Package Node.js project into an executable" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - pkg | |
| paths: | |
| - "lib/**" | |
| - "*.js" | |
| - "*.json" | |
| - ".github/workflows/pkg.yml" | |
| - "script/build/pkg.sh" | |
| workflow_dispatch: | |
| jobs: | |
| x64: | |
| runs-on: ubuntu-latest | |
| name: node${{ matrix.nodev }}-${{ matrix.platform }}-x64 | |
| strategy: | |
| matrix: | |
| include: | |
| - platform: linux | |
| nodev: 18 | |
| - platform: macos | |
| nodev: 18 | |
| - platform: win | |
| nodev: 18 | |
| # - platform: win | |
| # nodev: 12 | |
| steps: | |
| - name: "Checkout codes" | |
| uses: actions/checkout@v4 | |
| - name: "Use Node.js" | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "*" | |
| - name: "Pkg this" | |
| run: | | |
| npm run pkg "node${{ matrix.nodev }}-${{ matrix.platform }}-x64" | |
| - name: "Upload to artifact" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: node${{ matrix.nodev }}-${{ matrix.platform }}-x64 | |
| path: "dist/*.zip" | |
| - name: "Upload to release draft" | |
| uses: xresloader/upload-to-github-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| with: | |
| file: "dist/*.zip" | |
| tag_name: "v2" | |
| overwrite: true | |
| arm64: | |
| runs-on: ubuntu-latest | |
| name: node18-${{ matrix.platform }}-arm64 | |
| strategy: | |
| matrix: | |
| include: | |
| - platform: linux | |
| - platform: linuxstatic | |
| - platform: alpine | |
| steps: | |
| - name: "Checkout codes" | |
| uses: actions/checkout@v4 | |
| - name: "Pkg this" | |
| run: | | |
| npm run pkg "node18-${{ matrix.platform }}-arm64" | |
| - name: "Upload to artifact" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: node18-${{ matrix.platform }}-arm64 | |
| path: "dist/*.zip" | |
| - name: "Upload to release draft" | |
| uses: xresloader/upload-to-github-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| with: | |
| file: "dist/*.zip" | |
| tag_name: "v2" | |
| overwrite: true |