-
Notifications
You must be signed in to change notification settings - Fork 101
57 lines (57 loc) · 1.84 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
name: AUTO npm release, docs deploy and ssr regression - on master
on:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
name: Release to npm
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install packages.
run: npm ci
- name: Set up project.
run: npm run bootstrap
- name: Run tests.
run: USE_REACT_STRICT_MODE=0 npm run test && npm run test:vitest && npm run cy:component
- name: Release to NPM
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_EMAIL: ${{secrets.NPM_EMAIL}}
NPM_USERNAME: ${{secrets.NPM_USERNAME}}
run: npm run release
tag:
needs: release
if: "startsWith(github.event.head_commit.message, 'chore(release)')"
runs-on: ubuntu-latest
name: Tag release commit
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up git identity
run: git config --global user.name "instructure-ui-ci" && git config --global user.email "instructure-ui-ci@instructure.com"
# -a -m is needed to make the tag "annotated". Lerna needs annotated tags to work correctly with verisons
- name: Add tag
run: git tag -a v$(./.github/workflows/calculateVersion.sh) -m v$(./.github/workflows/calculateVersion.sh)
- name: Push tags
run: git push origin v$(./.github/workflows/calculateVersion.sh)
ssr-regression:
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cypress run
uses: cypress-io/github-action@v6
with:
working-directory: ./regression-test
build: npm run build
start: npm start