-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (54 loc) · 1.66 KB
/
release.yml
File metadata and controls
69 lines (54 loc) · 1.66 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Release
on:
push:
branches: [main]
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-node@v4
with:
node-version: '24.7.0'
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
- name: Unit tests
run: bun run test:unit
- name: E2E tests (protocol)
run: bun run --filter e2e-tests test:protocol
- name: Install Playwright
run: npx --prefix packages/e2e-tests playwright install --with-deps chromium
- name: E2E tests (browser)
run: bun run --filter e2e-tests test:browser
- name: Create release PR or publish
id: changesets
uses: changesets/action@v1
with:
publish: bun run release
version: bun run version
title: 'chore(release): version packages'
commit: 'chore(release): version packages'
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
- name: Publish canary snapshot
if: steps.changesets.outputs.published != 'true'
env:
NPM_CONFIG_PROVENANCE: true
run: |
git checkout ${{ github.sha }}
bun install
bun run build
npx changeset version --snapshot canary
npx changeset publish --tag canary --no-git-tag