-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.34 KB
/
Copy pathci.yml
File metadata and controls
50 lines (45 loc) · 1.34 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
48
49
50
name: CI
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: DeterminateSystems/nix-installer-action@v22
with:
flakehub: false
- uses: DeterminateSystems/magic-nix-cache-action@v14
- run: nix develop --command npm ci
- run: nix develop --command sh -c 'npx eslint . && npx prettier --check .'
- run: nix develop --command npx tsc --noEmit
- run: nix develop --command npx vitest run --exclude src/integration.test.ts
- run: nix develop --command npx vite build
- run: nix flake check --print-build-logs
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [linux]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release delete "${{ github.ref_name }}" --yes || true
- uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
generate_release_notes: true
make_latest: true