-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 913 Bytes
/
Copy pathci.yml
File metadata and controls
40 lines (31 loc) · 913 Bytes
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
name: CI
on:
push:
branches: [main]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- name: Typecheck
run: bunx tsc -p tsconfig.build.json --noEmit
- name: Test
run: bun test tests/core tests/azure
- name: Build
run: bun run build
- name: Create release if version is new
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(node -p "require('./package.json').version")
TAG="v$VERSION"
if gh release view "$TAG" >/dev/null 2>&1; then
echo "Release $TAG already exists, skipping"
else
echo "Creating release $TAG"
gh release create "$TAG" --title "$TAG" --generate-notes
fi