Skip to content

Commit e718844

Browse files
authored
chore(GH Actions): adjust actions to new requisites (#7774)
1 parent 0517dd3 commit e718844

File tree

3 files changed

+44
-49
lines changed

3 files changed

+44
-49
lines changed

.github/workflows/build.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: 'Build w/ React18 & 19'
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
name: 'Build'
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
react: ['18', '19']
13+
env:
14+
CYPRESS_INSTALL_BINARY: 0
15+
steps:
16+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
17+
18+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
19+
with:
20+
node-version-file: '.nvmrc'
21+
cache: 'yarn'
22+
23+
- name: Install
24+
run: yarn install --immutable
25+
26+
- name: Install 18
27+
if: ${{ matrix.react == '18' }}
28+
run: |
29+
yarn add "@types/react@18" "@types/react-dom@18" --dev
30+
yarn add react@18 react-dom@18
31+
32+
- name: Build
33+
run: yarn build
34+
35+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
36+
with:
37+
name: build-${{ matrix.react }}
38+
path: packages/*/dist

.github/workflows/main.yml

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -35,61 +35,14 @@ jobs:
3535
compression: 'gzip'
3636
clean-script: 'clean:remove-modules'
3737

38-
install:
39-
name: 'Install Dependencies'
40-
runs-on: ubuntu-latest
41-
steps:
42-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
43-
44-
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
45-
with:
46-
node-version-file: '.nvmrc'
47-
cache: 'yarn'
48-
49-
- name: Install and Build
50-
run: yarn install --immutable
38+
build:
39+
uses: './.github/workflows/build.yml'
5140

5241
test:
5342
needs: ['build']
5443
uses: './.github/workflows/test.yml'
5544

56-
build:
57-
needs: ['install']
58-
name: 'Build'
59-
runs-on: ubuntu-latest
60-
strategy:
61-
matrix:
62-
react: ['18', '19']
63-
env:
64-
CYPRESS_INSTALL_BINARY: 0
65-
steps:
66-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
67-
68-
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
69-
with:
70-
node-version-file: '.nvmrc'
71-
cache: 'yarn'
72-
73-
- name: Install
74-
run: yarn install --immutable
75-
76-
- name: Install 19
77-
if: ${{ matrix.react == '19' }}
78-
run: |
79-
echo "$(jq '.resolutions += {"@types/react": "npm:types-react@rc", "@types/react-dom": "npm:types-react-dom@rc" }' package.json)" > package.json
80-
yarn add react@rc react-dom@rc
81-
yarn
82-
83-
- name: Build
84-
run: yarn build
85-
86-
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
87-
with:
88-
name: build-${{ matrix.react }}
89-
path: packages/*/dist
90-
9145
lint:
92-
needs: ['install']
9346
runs-on: ubuntu-latest
9447
env:
9548
CYPRESS_INSTALL_BINARY: 0

.github/workflows/release-snapshot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: 'Release - Snapshot'
33
on: workflow_dispatch
44

55
jobs:
6+
build:
7+
uses: './.github/workflows/build.yml'
8+
69
test:
10+
needs: ['build']
711
uses: './.github/workflows/test.yml'
812
with:
913
reportCoverage: false

0 commit comments

Comments
 (0)