-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (94 loc) · 2.75 KB
/
actions.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
88
89
90
91
92
93
94
name: shidoka-applications
on:
push:
branches:
- main
- beta
- next
pull_request:
env:
GH_TOKEN: '${{ secrets.GH_TOKEN }}'
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Lint
run: npm run lint
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Build component bundles
run: npm run build
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build-artifact
path: dist
Test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Install Playwright
run: npx playwright@latest install --with-deps
- name: Build Storybook
run: npm run build-storybook --quiet
- name: Serve Storybook and run tests
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port 6006 --silent" \
"npx wait-on tcp:6006 && npm run test"
Release:
needs: [Lint, Build, Test]
runs-on: ubuntu-latest
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' || github.ref == 'refs/heads/next') && github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
scope: '@kyndryl-design-system'
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Install semantic-release extra plugins
run: npm i --save-dev @semantic-release/git --legacy-peer-deps
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-artifact
path: dist
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN_PACKAGES }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: HUSKY=0 npx semantic-release