-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (76 loc) · 2.07 KB
/
react-ci.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
name: React CI
env:
NODE_VERSION: 20
on:
push:
branches:
- "**"
paths:
- "*"
- "core/**"
- "website/**"
- "react/**"
permissions:
actions: read
checks: write # allow dependabot-triggered runs to create checks
contents: write # allow dependabot-triggered runs to create releases
deployments: read
issues: write
discussions: none
packages: read
pages: none
pull-requests: write # allow dependabot-triggered runs to comment on PRs
repository-projects: read
security-events: none
statuses: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install Dependencies
run: npm ci
- name: Run React Tests
run: npm run react:test
publish:
needs: [test]
name: Publish NPM Package
runs-on: ubuntu-latest
env:
GIT_AUTHOR_NAME: "im-pipeline-bot"
GIT_AUTHOR_EMAIL: ${{ secrets.COMMIT_BOT_EMAIL }}
GIT_COMMITTER_NAME: "im-pipeline-bot"
GIT_COMMITTER_EMAIL: ${{ secrets.COMMIT_BOT_EMAIL }}
GITHUB_TOKEN: ${{ secrets.PIPELINE_BOT_PAT }}
GH_TOKEN: ${{ secrets.PIPELINE_BOT_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.PIPELINE_BOT_PAT }}
fetch-depth: 0
persist-credentials: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install Dependencies
run: npm ci
- name: Build
run: |
npm run core:build
npm run react:build
npm run website:build
git add -A
- name: Semantic Release - core
run: npx cross-env PACKAGE_NAME=core npx semantic-release
- name: Semantic Release - react
run: npx cross-env PACKAGE_NAME=react npx semantic-release