-
Notifications
You must be signed in to change notification settings - Fork 66
99 lines (94 loc) · 2.72 KB
/
canary.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: 🚀 Release Canary
on:
push:
branches:
- "canary"
jobs:
test:
name: 🧪 Run tests
runs-on: ubuntu-latest
outputs:
react-email: ${{ steps.filter.outputs.react-email }}
cli: ${{ steps.filter.outputs.cli }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: 📦 Install dependencies
run: bun install
- name: 🔍 Run type checking
run: bun run typecheck
# - name: 🔬 Run linting
# run: bun run lint
- name: 🧪 Run unit tests
run: bun run test
- name: 🔍 Filter changes
id: filter
uses: dorny/paths-filter@v2
with:
filters: |
react-email:
- 'packages/react-email/src/**'
cli:
- 'packages/cli/src/**'
publish-cli:
name: 🚀 Publish CLI
if: needs.test.outputs.cli == 'true'
needs: [test]
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: 📦 Install dependencies
run: bun install
- name: 🏗️ Build
working-directory: packages/cli
run: bun run build
- name: 🚀 Create and publish versions
uses: changesets/action@master
with:
version: bun run changeset version --snapshot canary
commit: "chore: update versions"
title: "chore: update versions"
publish: bun run changeset publish --tag canary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-react-email:
name: 🚀 Publish React Email
if: needs.test.outputs.react-email == 'true'
needs: [test]
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: 📦 Install dependencies
run: bun install
- name: 🏗️ Build
working-directory: packages/react-email
run: bun run build
- name: 🚀 Create and publish versions
uses: changesets/action@master
with:
version: bun run changeset version --snapshot canary
commit: "chore: update versions"
title: "chore: update versions"
publish: bun run changeset publish --tag canary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}