-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.17 KB
/
ci.yml
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
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [ opened, synchronize, reopened, labeled ]
pull_request_review:
types: [ submitted ]
name: CI
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
packages: write # to publish packages (npm publish)
jobs:
ci-setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-bun
- uses: ./.github/actions/build
- uses: ./.github/actions/prevent-uncommit-changes
- run: bun test
- run: bun run lint
ci-canary-release:
runs-on: ubuntu-latest
needs: [ci-setup]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-bun
- uses: actions/setup-node@v3
with:
registry-url: "https://npm.pkg.github.com"
- uses: ./.github/actions/cache
with:
scope: build
- run: npm version prerelease --preid=canary.$(git rev-parse --short HEAD) --no-git-tag-version
- run: npm publish --tag canary
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}