-
-
Notifications
You must be signed in to change notification settings - Fork 642
61 lines (51 loc) · 1.42 KB
/
build.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: 🛠️ Build + Test
on:
push:
paths:
- 'build/**'
- 'icons/*.svg'
- 'patches/**'
- 'src/**'
- '.bun-version'
- 'bunfig.toml'
- 'package.json'
- 'sheriff.config.ts'
- '!*.md'
pull_request:
paths:
- 'build/**'
- 'icons/*.svg'
- 'patches/**'
- 'src/**'
- '.bun-version'
- 'bunfig.toml'
- 'package.json'
- 'sheriff.config.ts'
- '!*.md'
permissions:
contents: read
pull-requests: write
issues: write # Update issue labels
jobs:
build-and-test:
name: Build & Test Extension
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 🔧 Setup Bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
with:
bun-version-file: ".bun-version"
- name: 📦 Install dependencies
run: bun install --frozen-lockfile
- name: 🚀 Test + Build
id: build
run: |
bun test
bun run vscode:prepublish
- name: 🏷️ Manage label based on build result
if: ${{ always() && github.event_name == 'pull_request' }}
run: .github/scripts/update-status-label.sh ${{ github.event.pull_request.number }} ${{ steps.build.outcome }} "❌ failed build"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}