-
Notifications
You must be signed in to change notification settings - Fork 43
65 lines (57 loc) · 1.94 KB
/
publish.yaml
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
name: build
on:
push:
branches:
- master
jobs:
build-and-test:
runs-on: ubuntu-latest
name: Publish
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Download Cypress
uses: bahmutov/npm-install@v1
with:
install-command: npm i
env:
CYPRESS_INSTALL_BINARY: 0
- name: Eslint and Prettify
run: npm run lint
- name: Check Cypress cache
run: |
npx cypress cache path
npx cypress cache list
- name: Restore / Cache the binary
id: cache-cypress
uses: actions/cache@v3
with:
path: ~/.cache/Cypress
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
cypress-cache-v2-${{ runner.os }}-
cypress-cache-v2-
- name: Install Cypress
run: |
npx cypress install
npx cypress cache list
- name: Testing
run: |
npm run test:prepare:basic
npm run test:prepare:statuses
npm run test:prepare:cucumber
npm run test
# https://github.com/cycjimmy/semantic-release-action
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
branch: master
extra_plugins: |
@semantic-release/git
@semantic-release/changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}