-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 1.1 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:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"
- name: Install
run: env NODE_ENV=development npm install --prefer-offline --no-audit --force && npm i alfama @types/json-schema --save
- name: Test
run: npm run typecheck && npm run test
- name: Build
run: env NODE_ENV=production npm run build
- run: jq -s 'add' package.json package-publish.json > package-final.json && rm -rf package.json && mv package-final.json package.json
- id: Publish
uses: JS-DevTools/npm-publish@v3
if: github.ref == 'refs/heads/master'
with:
token: ${{ secrets.NPM_TOKEN }}
access: "public"
- if: steps.publish.outputs.type != 'none'
run: |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"