-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.02 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
name: Build, Test and Release
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
jobs:
build:
timeout-minutes: 2
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.14.1
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- name: Install
run: pnpm install
- name: Build
run: pnpm build
- name: Lint and Typecheck
run: pnpm check
env:
CI: true
- name: Publish to NPM
if: ${{ github.ref == 'refs/heads/main' }}
id: publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
check-version: true
- if: steps.publish.outputs.type != 'none'
run: |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"