Bump js-yaml from 3.14.1 to 3.14.2 in /js #86
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: js ci | |
| env: | |
| DEBUG: napi:* | |
| APP_NAME: gribberish-js | |
| MACOSX_DEPLOYMENT_TARGET: '10.13' | |
| CARGO_INCREMENTAL: '1' | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| paths: | |
| - 'js/**' | |
| - 'gribberish/**' | |
| - 'types/**' | |
| - 'macros/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| pull_request: | |
| paths: | |
| - 'js/**' | |
| - 'gribberish/**' | |
| - 'types/**' | |
| - 'macros/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: yarn | |
| cache-dependency-path: js/yarn.lock | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Install dependencies | |
| run: yarn install | |
| working-directory: js | |
| - name: Oxlint | |
| run: yarn lint | |
| working-directory: js | |
| - name: Cargo fmt | |
| run: cargo fmt -- --check | |
| - name: Clippy | |
| run: cargo clippy | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| settings: | |
| - host: macos-latest | |
| target: x86_64-apple-darwin | |
| build: yarn build --target x86_64-apple-darwin | |
| - host: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| build: yarn build --target x86_64-pc-windows-msvc | |
| - host: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| build: yarn build --target x86_64-unknown-linux-gnu --use-napi-cross | |
| - host: macos-latest | |
| target: aarch64-apple-darwin | |
| build: yarn build --target aarch64-apple-darwin | |
| - host: ubuntu-latest | |
| target: wasm32-wasip1-threads | |
| build: yarn build --target wasm32-wasip1-threads | |
| name: stable - ${{ matrix.settings.target }} - node@24 | |
| runs-on: ${{ matrix.settings.host }} | |
| defaults: | |
| run: | |
| working-directory: js | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: yarn | |
| cache-dependency-path: js/yarn.lock | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| targets: ${{ matrix.settings.target }} | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| ~/.napi-rs | |
| .cargo-cache | |
| target/ | |
| key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Build | |
| run: ${{ matrix.settings.build }} | |
| shell: bash | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bindings-${{ matrix.settings.target }} | |
| path: | | |
| js/${{ env.APP_NAME }}.*.node | |
| js/${{ env.APP_NAME }}.*.wasm | |
| if-no-files-found: error | |
| test-macOS-windows-binding: | |
| name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} | |
| needs: | |
| - build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| settings: | |
| - host: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| architecture: x64 | |
| - host: macos-latest | |
| target: aarch64-apple-darwin | |
| architecture: arm64 | |
| - host: macos-latest | |
| target: x86_64-apple-darwin | |
| architecture: x64 | |
| node: | |
| - '20' | |
| - '22' | |
| runs-on: ${{ matrix.settings.host }} | |
| defaults: | |
| run: | |
| working-directory: js | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: yarn | |
| cache-dependency-path: js/yarn.lock | |
| architecture: ${{ matrix.settings.architecture }} | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bindings-${{ matrix.settings.target }} | |
| path: js | |
| - name: List packages | |
| run: ls -R . | |
| shell: bash | |
| - name: Test bindings | |
| run: yarn test | |
| test-linux-binding: | |
| name: Test ${{ matrix.target }} - node@${{ matrix.node }} | |
| needs: | |
| - build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - x86_64-unknown-linux-gnu | |
| node: | |
| - '20' | |
| - '22' | |
| runs-on: ${{ contains(matrix.target, 'aarch64') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} | |
| defaults: | |
| run: | |
| working-directory: js | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: yarn | |
| cache-dependency-path: js/yarn.lock | |
| - name: Install dependencies | |
| run: | | |
| yarn config set --json supportedArchitectures.cpu '["current", "arm64", "x64", "arm"]' | |
| yarn config set --json supportedArchitectures.libc '["current", "musl", "gnu"]' | |
| yarn install | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bindings-${{ matrix.target }} | |
| path: js | |
| - name: List packages | |
| run: ls -R . | |
| shell: bash | |
| - name: Test bindings | |
| uses: tj-actions/docker-run@v2 | |
| with: | |
| image: node:${{ matrix.node }}-slim | |
| name: test-bindings-${{ matrix.target }} | |
| options: '-v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }}/js' | |
| args: yarn test | |
| test-wasi: | |
| name: Test WASI target | |
| needs: | |
| - build | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: js | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: yarn | |
| cache-dependency-path: js/yarn.lock | |
| - name: Install dependencies | |
| run: | | |
| yarn config set supportedArchitectures.cpu "wasm32" | |
| yarn install | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bindings-wasm32-wasip1-threads | |
| path: js | |
| - name: List packages | |
| run: ls -R . | |
| shell: bash | |
| - name: Test bindings | |
| run: yarn test | |
| env: | |
| NAPI_RS_FORCE_WASI: 1 | |
| publish: | |
| name: Publish | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| permissions: | |
| id-token: write | |
| needs: | |
| - lint | |
| - test-macOS-windows-binding | |
| - test-linux-binding | |
| - test-wasi | |
| defaults: | |
| run: | |
| working-directory: js | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: yarn | |
| cache-dependency-path: js/yarn.lock | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Create npm dirs | |
| run: yarn napi create-npm-dirs | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: js/artifacts | |
| - name: Move artifacts | |
| run: yarn artifacts | |
| - name: List packages | |
| run: ls -R ./npm | |
| shell: bash | |
| - name: Publish | |
| run: | | |
| npm config set provenance true | |
| echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | |
| npm publish --access public | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |