-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (52 loc) · 1.54 KB
/
semantic-release.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
name: Release
on:
push:
branches: [main, beta]
jobs:
publish-new-package:
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0 # 👈 Required to retrieve git history
token: ${{ secrets.SEMANTIC_RELEASE_GH_TOKEN }}
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: yarn install
- name: Unit Tests
run: yarn test
- name: Release to NPM
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn semantic-release
- name: Deploy to Chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to Github Pages
run: yarn deploy-storybook --ci
env:
GH_TOKEN: palmetto:${{ secrets.GITHUB_TOKEN }}
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: https://npm.pkg.github.com/
scope: '@palmetto'
- name: Release to GitHub Packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: yarn publish