0.0.1 #4
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: {} | |
| env: | |
| DEBUG: 'napi:*' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build - ${{ matrix.target }} | |
| permissions: | |
| contents: read | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| - target: x86_64-unknown-linux-musl | |
| os: ubuntu-latest | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| - target: aarch64-unknown-linux-musl | |
| os: ubuntu-latest | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| - target: aarch64-pc-windows-msvc | |
| os: windows-latest | |
| steps: | |
| - name: Support longpaths | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: git config --system core.longpaths true | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| - uses: mlugg/setup-zig@v2 | |
| if: ${{ contains(matrix.target, 'musl') }} | |
| with: | |
| version: 0.15.2 | |
| - name: Install cargo-zigbuild | |
| uses: taiki-e/install-action@v2 | |
| if: ${{ contains(matrix.target, 'musl') }} | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| tool: cargo-zigbuild | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build ${{ matrix.target }} | |
| working-directory: napi/angular-compiler | |
| if: ${{ !contains(matrix.target , 'gnu') && !contains(matrix.target, 'musl') }} | |
| run: pnpm build-dev -- --release --target ${{ matrix.target }} | |
| - name: Build ${{ matrix.target }} | |
| working-directory: napi/angular-compiler | |
| if: ${{ contains(matrix.target , 'gnu') }} | |
| run: pnpm build-dev -- --release --target ${{ matrix.target }} --use-napi-cross | |
| - name: Build ${{ matrix.target }} | |
| working-directory: napi/angular-compiler | |
| if: ${{ contains(matrix.target, 'musl') }} | |
| run: pnpm build-dev -- --release --target ${{ matrix.target }} -x | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: bindings-${{ matrix.target }} | |
| path: napi/angular-compiler/*.node | |
| if-no-files-found: error | |
| publish: | |
| name: Publish | |
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: write | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| path: napi/angular-compiler/artifacts | |
| - name: Create npm dirs | |
| run: pnpm --filter ./napi/angular-compiler exec napi create-npm-dirs | |
| - name: Move artifacts | |
| run: pnpm --filter ./napi/angular-compiler artifacts | |
| - uses: actions/setup-node@v6 | |
| with: | |
| registry-url: 'https://npm.pkg.github.com' | |
| - name: Publish to npm | |
| working-directory: napi/angular-compiler | |
| run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |