-
Notifications
You must be signed in to change notification settings - Fork 1
140 lines (116 loc) · 3.32 KB
/
release-package.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Create Design System Template Package
on:
push:
branches:
- main
release:
types: [created]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
- name: Install yarn
run: npm install -g yarn
- name: Cache node_modules
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Generate test coverage
run: yarn run test:coverage
- name: Upload coverage reports
uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage
publish-pages:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v2
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
- name: Install yarn
run: npm install -g yarn
- name: Cache node_modules
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Build Storybook
run: yarn run build-storybook
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'storybook-static'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
registry-url: https://npm.pkg.github.com/
always-auth: true
- name: Pull latest commits
run: git pull
- name: Automated Version Bump
uses: phips28/gh-action-bump-version@v9.0.27
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
skip-tag: 'true'
minor-wording: 'Add,Adds,new,update,Setup'
major-wording: 'MAJOR,cut-major,Breaking,Upgrade'
commit-message: 'CI: bumps version to {{version}} [skip ci]'
- name: Install yarn
run: npm install -g yarn
- name: Cache node_modules
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Build package
run: yarn build
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: design-system-template
path: dist
- name: Publish package
run: yarn publish .
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}