-
Notifications
You must be signed in to change notification settings - Fork 6
36 lines (32 loc) · 1.01 KB
/
ci.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
name: ci
on: [push]
jobs:
tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Setup node 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cypress tests 🧪
uses: cypress-io/github-action@v6
with:
# check types
build: npm run lint
# use a custom command to conform all expected tests
# were correctly generated
# using https://www.npmjs.com/package/cypress-expect
command: npm test
- name: Semantic Release 🚀
if: github.ref == 'refs/heads/main'
# https://github.com/cycjimmy/semantic-release-action
uses: cycjimmy/semantic-release-action@v4
with:
branches: main
env:
# github token is automatically created by the GH Action workflow
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# created using semantic-release
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}