Skip to content

v20.0.1

v20.0.1 #14

name: Verify and Deploy to npmjs
on:
push:
tags:
- "v*"
permissions:
id-token: write
contents: read
jobs:
deploy_npmjs_package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
scope: "@proangular"
cache: "npm"
- name: Update npm to latest
run: npm install -g npm@latest
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Lint (optional)
if: hashFiles('.eslintrc*') != ''
run: npm run lint --if-present
- name: Test (optional)
run: npm test --if-present
- name: Read package version
id: pkg
shell: bash
run: |
VERSION=$(node -p 'JSON.parse(require("fs").readFileSync("package.json","utf8")).version')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Publish to npm
run: npm publish