-
-
Notifications
You must be signed in to change notification settings - Fork 18
81 lines (66 loc) · 2.13 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
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
name: ci
permissions:
contents: write
on:
pull_request:
branches:
- main
push:
branches:
- alpha
- beta
- main
- renovate/**
jobs:
ci:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch complete history for proper release detection
persist-credentials: false # to make `cycjimmy/semantic-release-action` work on protected branches
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
- name: 📦 Install dependencies
run: pnpm install
- name: Install Playwright
# does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved
run: pnpm playwright install chromium
- name: 🚧 Set up project
run: pnpm dev:prepare
- name: 🚧 Prepare playground
# prepare the playground for tests
run: pnpm playground:prepare
- name: 🔠 Lint project
run: pnpm run lint
- name: 🧪 Test project
run: pnpm test
- name: 🛠 Build project
run: pnpm build
- name: 💪 Test types
run: pnpm test:types
- name: 🟩 Coverage
uses: codecov/codecov-action@v4
- name: 🌍 Release
id: semantic
uses: cycjimmy/semantic-release-action@b1b432f13acb7768e0c8efdec416d363a57546f2 # v4.1.1
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
conventional-changelog-conventionalcommits
semantic_version: 24.0.0
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # required to be owned by a custom user to create releases & comments on protected branches
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: ✨ Beautify changelog
if: steps.semantic.outputs.new_release_published == 'true'
run: npx changelogithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}