-
Notifications
You must be signed in to change notification settings - Fork 25
104 lines (87 loc) · 3.66 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
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
name: Release
on:
push:
branches:
- main
concurrency: release-${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
if: github.repository_owner == 'isaac-mason'
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max-old-space-size=4096'
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Node.js 22.x
uses: actions/setup-node@v2
with:
node-version: 22.x
- name: Install Dependencies
run: yarn
- name: Build Packages
run: ./ci/build-packages.sh
shell: bash
- name: Test
run: yarn test
# navmesh website
- name: NavMesh Website - Pull Vercel Environment Information
run: yarn run vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_NAVMESH_WEBSITE_PROJECT_ID }}
- name: NavMesh Website - Build Project Artifacts
run: yarn run vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VITE_GTAG_ID: ${{ secrets.PROD_VITE_GTAG_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_NAVMESH_WEBSITE_PROJECT_ID }}
- name: NavMesh Website - Deploy Project Artifacts to Vercel
run: yarn run vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_NAVMESH_WEBSITE_PROJECT_ID }}
# storybook
- name: Storybook - Pull Vercel Environment Information
run: yarn run vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_STORYBOOK_PROJECT_ID }}
- name: Storybook - Build Project Artifacts
run: yarn run vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_STORYBOOK_PROJECT_ID }}
- name: Storybook - Deploy Project Artifacts to Vercel
run: yarn run vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_STORYBOOK_PROJECT_ID }}
# docs
- name: Docs - Pull Vercel Environment Information
run: yarn run vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_DOCS_PROJECT_ID }}
- name: Docs - Build Project Artifacts
run: yarn run vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_DOCS_PROJECT_ID }}
- name: Docs - Deploy Project Artifacts to Vercel
run: yarn run vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_DOCS_PROJECT_ID }}
# release
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: yarn run version
publish: yarn run publish
commit: 'chore(changeset): release packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}