refactor: use crate from deno repo #397
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: ci | |
| on: [push, pull_request] | |
| jobs: | |
| deno: | |
| name: deno_cache_dir ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| os: [macOS-latest, ubuntu-latest, windows-latest] | |
| if: | | |
| github.event_name == 'push' || | |
| !startsWith(github.event.pull_request.head.label, 'denoland:') | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v6 | |
| - name: Install rust | |
| uses: dsherret/rust-toolchain-file@v1 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install Deno | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: canary | |
| - name: Install wasm32-unknown-unknown | |
| run: rustup target add wasm32-unknown-unknown | |
| - name: Format | |
| if: contains(matrix.os, 'ubuntu') | |
| run: cargo fmt --check && deno fmt --check | |
| - name: Clippy | |
| if: contains(matrix.os, 'ubuntu') | |
| run: cargo clippy --target=wasm32-unknown-unknown && deno lint | |
| - name: Build | |
| run: deno task build | |
| - name: Test | |
| run: deno task test | |
| - name: Publish JSR | |
| if: contains(matrix.os, 'ubuntu') | |
| run: deno run -A jsr:@david/publish-on-tag@0.1.3 |