-
Notifications
You must be signed in to change notification settings - Fork 37
144 lines (118 loc) · 3.64 KB
/
Copy pathci.yml
File metadata and controls
144 lines (118 loc) · 3.64 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: CI
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
jobs:
install_and_test_win:
runs-on: windows-latest
timeout-minutes: 5
strategy:
matrix:
node-version: [24]
name: Windows - Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Typecheck
run: pnpm typecheck
- name: Build
run: pnpm build
- name: Test
shell: cmd
run: |
pnpm test || exit /b 1
pnpm test:post || exit /b 1
install_and_test:
runs-on: [ubuntu-latest]
timeout-minutes: 5
strategy:
matrix:
include:
- node-version: 20
typescript-version: 6.0.2
react-types-version: 19.2.14
react-dom-types-version: 19.2.3
- node-version: 22
typescript-version: 6.0.2
react-types-version: 19.2.14
react-dom-types-version: 19.2.3
- node-version: 24
typescript-version: 6.0.2
react-types-version: 19.2.14
react-dom-types-version: 19.2.3
- node-version: 24
typescript-version: 5.9.3
react-types-version: 18.3.28
react-dom-types-version: 18.3.7
name: Linux - Node ${{ matrix.node-version }} - TS ${{ matrix.typescript-version }}
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Setup TypeScript and React types
run: pnpm add --save-dev "typescript@${{ matrix.typescript-version }}" "@types/react@${{ matrix.react-types-version }}" "@types/react-dom@${{ matrix.react-dom-types-version }}" --prefer-offline
- name: Typecheck
run: pnpm typecheck
- name: Build
run: pnpm build
- name: Test
run: |
pnpm test
pnpm test:post
release:
runs-on: ubuntu-latest
needs: [install_and_test]
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4.2.2
- uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Determine tag
id: determine_tag
run: |
echo "tag=$(echo $GITHUB_REF | grep -Eo 'alpha|beta|rc')" >> $GITHUB_OUTPUT
- name: Publish to versioned tag
if: steps.determine_tag.outputs.tag != ''
run: |
echo "Publishing to ${{ steps.determine_tag.outputs.tag }} tag"
npm publish --tag ${{ steps.determine_tag.outputs.tag }} --access public
env:
NPM_CONFIG_PROVENANCE: true
- name: Publish to latest
if: steps.determine_tag.outputs.tag == ''
run: |
echo "Publishing to latest"
npm publish --access public
env:
NPM_CONFIG_PROVENANCE: true