-
Notifications
You must be signed in to change notification settings - Fork 18
47 lines (42 loc) · 1.21 KB
/
ci.yml
File metadata and controls
47 lines (42 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
timeout-minutes: 30
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: Format
if: contains(matrix.os, 'ubuntu')
run: cargo fmt --check && deno fmt --check
- name: Clippy
if: contains(matrix.os, 'ubuntu')
run: cargo clippy && 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