Skip to content

Update ci.yml

Update ci.yml #12

Workflow file for this run

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 }}"