-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (40 loc) · 1.1 KB
/
cicd.yml
File metadata and controls
49 lines (40 loc) · 1.1 KB
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
name: CICD
on:
push:
branches:
- 'main'
pull_request:
branches:
- '*'
jobs:
cicd:
runs-on: ubuntu-latest
concurrency: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev build-essential python3
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build CLI
run: pnpm run build
- name: Type check
run: pnpm run check
- name: Run tests
run: pnpm test
- name: Create Release Pull Request or Publish
if: github.ref == 'refs/heads/main'
uses: changesets/action@v1
with:
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_SECRET }}