Skip to content

Commit 1676bb0

Browse files
committed
chore: Use GitHub Actions
1 parent 6bdb13d commit 1676bb0

File tree

4 files changed

+60
-1
lines changed

4 files changed

+60
-1
lines changed

.github/workflows/chromatic.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Chromatic
2+
3+
on: push
4+
5+
jobs:
6+
chromatic-deployment:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Install dependencies
11+
run: yarn
12+
- name: Publish to Chromatic
13+
uses: chromaui/action@v1
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

.github/workflows/npm-package.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: npm package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 10
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: '16'
17+
cache: 'yarn'
18+
registry-url: 'http://npm.pkg.github.com'
19+
- run: |
20+
yarn
21+
yarn build
22+
yarn publish
23+
env:
24+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Test
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
with:
11+
fetch-depth: 10
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: '16'
15+
cache: 'yarn'
16+
- run: yarn
17+
- run: yarn test
18+

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"preview": "vite preview",
2727
"test": "vitest",
2828
"sb": "start-storybook -p 6006 --no-open",
29-
"build:sb": "build-storybook"
29+
"build-storybook": "build-storybook"
3030
},
3131
"devDependencies": {
3232
"@babel/core": "^7.17.12",

0 commit comments

Comments
 (0)