-
Notifications
You must be signed in to change notification settings - Fork 21
73 lines (73 loc) · 2.51 KB
/
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: release
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
contributors:
runs-on: ubuntu-latest
name: Contributors
steps:
- name: Doc contributors
uses: akhilmhdh/[email protected]
if: github.event_name == 'push'
with:
image_size: 50
readme_path: 'documentation/contributing/Contributors.md'
columns_per_row: 8
use_username: true
commit_message: 'docs(chore): update contributors'
committer_username: 'spark-ui-bot'
committer_email: '[email protected]'
auto_detect_branch_protection: false
collaborators: 'outside'
env:
GITHUB_TOKEN: ${{ secrets.SA_TOKEN }}
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.SA_TOKEN }}
fetch-depth: 0
- name: Identity
run: |
git config --global user.name 'spark-ui-bot'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
- name: Install
uses: ./.github/composite-actions/install
- name: Setup npm
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish
run: npm run release
deploy:
needs: [contributors, release]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install
uses: ./.github/composite-actions/install
- name: Install Vercel CLI
run: npm install --global vercel@latest --no-save --no-fund --no-audit --no-scripts
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: npm run build
- name: Build Storybook
run: npm run storybook:build
- name: Build tailwind config viewer
run: npm run tailwind-config-viewer:build
- name: Deploy Storybook to Vercel
run: vercel deploy --token $VERCEL_TOKEN --prod --yes
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{secrets.VERCEL_TOKEN}}