chore: update ci #19
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
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '!README.md' | |
| - '!LICENSE' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| build: | |
| name: Build | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| settings: | |
| - host: macos-26-intel | |
| artifact: darwin-x64 | |
| - host: macos-latest | |
| artifact: darwin-arm64 | |
| - host: ubuntu-24.04-arm | |
| artifact: linux-arm64 | |
| - host: ubuntu-latest | |
| artifact: linux-x64 | |
| - host: windows-11-arm | |
| artifact: win-arm64 | |
| - host: windows-latest | |
| artifact: win-x64 | |
| runs-on: ${{ matrix.settings.host }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 25.9.0 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 10.33.0 | |
| run_install: true | |
| - name: Build | |
| run: pnpm build --build-exe | |
| - name: Show built files | |
| run: node scripts/tree.ts | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ${{ matrix.settings.artifact }} | |
| path: target | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 25.9.0 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 10.33.0 | |
| run_install: true | |
| - name: Test | |
| run: pnpm test:ci | |
| publish: | |
| name: Continuous release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22.x | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 10.33.0 | |
| run_install: true | |
| - name: Build | |
| run: pnpm build | |
| - name: Publish packages | |
| run: pnpm dlx pkg-pr-new publish --compact --pnpm --bin . |