-
Notifications
You must be signed in to change notification settings - Fork 28
74 lines (74 loc) · 2.02 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
name: Release
on:
push:
branches:
- dev
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Run linters
run: npm run lint
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
browser:
- 'chrome'
# - 'firefox'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Run Cypress
uses: cypress-io/github-action@v4
with:
build: npm run build
start: npm start
browser: ${{ matrix.browser }}
semantic-release:
runs-on: ubuntu-latest
# wait until test & lint complete
needs: ['lint', 'test']
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Semantic Release
id: release
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
with:
extra_plugins: |
@eclass/semantic-release-sentry-releases
@semantic-release/git
@semantic-release/exec
- name: Create Sentry release
if: ${{ steps.release.outputs.release == 'yes' }}
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production