Repository navigation
91 lines (77 loc) · 2.52 KB
/
Copy pathci.yml
File metadata and controls
91 lines (77 loc) · 2.52 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
name: CI
on:
pull_request:
push:
branches:
- '**'
tags:
- '!**'
jobs:
ci:
name: CI (React ${{ matrix.react }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
react: ['16.x', '17.x', '18.x', '19.0', '19.x']
steps:
- name: Checkout repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node.js 22.x
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22.x
cache: yarn
- name: Install dependencies
run: yarn install
- name: Install React ${{ matrix.react }}
run:
yarn add --dev react@${{ matrix.react }} react-dom@${{ matrix.react }}
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
- name: Build package
run: yarn build
- name: Run tests, lint and verify package integrity
run: yarn run validate
release:
permissions:
id-token: write # required for provenance
actions: write # to cancel/stop running workflows (styfle/cancel-workflow-action)
contents: write # to create release tags (cycjimmy/semantic-release-action)
issues: write # to post release that resolves an issue (cycjimmy/semantic-release-action)
needs: ci
runs-on: ubuntu-latest
if:
${{ github.repository ==
'testing-library/react-render-stream-testing-library' && github.event_name
== 'push' }}
steps:
- name: Checkout repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node.js 24.x
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '>=24.18.0 <25'
cache: yarn
- name: Install dependencies
run: yarn install
- name: 🏗 Run build script
run: yarn build
- name: Enable npm staged publishing
run: |
echo "$GITHUB_WORKSPACE/scripts/wrap-staged" >> "$GITHUB_PATH"
- name: 🚀 Release
uses: cycjimmy/semantic-release-action@d9bf53a078bd2f86aaffaec796dbb3d28f1b6f34 # v8
with:
semantic_version: '25'
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'main',
'next',
'next-major',
{name: 'beta', prerelease: true},
{name: 'alpha', prerelease: true}
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}