-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (94 loc) · 3.04 KB
/
Copy pathci.yml
File metadata and controls
97 lines (94 loc) · 3.04 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
name: Verify
on: [push, pull_request, workflow_dispatch]
concurrency:
group: verify-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
react: ['18.3.1', '19']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm install --no-save react@${{ matrix.react }} react-dom@${{ matrix.react }}
- run: npm run check
- run: npx playwright install --with-deps chromium firefox webkit
- run: npm run test:e2e
- run: npm run benchmark
- uses: actions/upload-artifact@v4
if: always()
# Diagnostic uploads must not fail verification when org storage is full.
continue-on-error: true
with:
name: evidence-react-${{ matrix.react }}
retention-days: 7
path: |
test-results/
benchmarks/results.json
verify:
name: Verified
if: always()
needs: test
runs-on: ubuntu-latest
steps:
- name: Require every React version to pass
env:
RESULT: ${{ needs.test.result }}
run: test "$RESULT" = success
publish:
name: Publish beta package
needs: verify
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
runs-on: ubuntu-latest
environment: npm
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 24
registry-url: https://registry.npmjs.org
- run: npm ci
- run: node scripts/validate-release.mjs
- run: npm run build
- run: npm run test:package
- name: Publish verified beta with provenance
run: npm publish --tag beta --access public --provenance
deploy:
name: Deploy website
needs: [verify, publish]
if: always() && needs.verify.result == 'success' && github.event_name != 'pull_request' && ((github.ref_type == 'tag' && needs.publish.result == 'success') || (github.ref_type != 'tag' && needs.publish.result == 'skipped'))
runs-on: ubuntu-latest
environment:
name: ${{ (github.ref == 'refs/heads/main' || github.ref_type == 'tag') && 'production' || 'preview' }}
url: ${{ steps.deploy.outputs.url }}
env:
VERCEL_ORG_ID: ${{ vars.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ vars.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
DEPLOY_ENVIRONMENT: ${{ (github.ref == 'refs/heads/main' || github.ref_type == 'tag') && 'production' || 'preview' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run build:website
env:
REQUIRE_NPM_PUBLICATION: 'true'
- name: Deploy verified website
id: deploy
run: node scripts/deploy-website.mjs