Skip to content

fix: make pdf export dependency free #56

fix: make pdf export dependency free

fix: make pdf export dependency free #56

Workflow file for this run

name: Release @angular-bootstrap/ngbootstrap
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: read
id-token: write
jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest
environment: npm-production
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22.x
- name: Use current npm for trusted publishing
run: npm install -g npm@latest
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Run tests
run: pnpm test:ci
- name: Build library
run: pnpm build
- name: Validate package metadata
run: pnpm release:verify
- name: Validate release tag
run: |
set -euo pipefail
VERSION="$(node -p "require('./package.json').version")"
TAG="${GITHUB_REF_NAME}"
if [ "$TAG" != "v$VERSION" ]; then
echo "Release tag $TAG must match package version v$VERSION."
exit 1
fi
- name: Verify version is unpublished
run: |
set -euo pipefail
VERSION="$(node -p "require('./package.json').version")"
if npm view "@angular-bootstrap/ngbootstrap@$VERSION" version >/dev/null 2>&1; then
echo "@angular-bootstrap/ngbootstrap@$VERSION is already published."
exit 1
fi
- name: Inspect npm package contents
run: pnpm pack:dry-run
- name: Audit production dependencies
run: pnpm security:audit
- name: Ensure tokenless publishing
run: |
set -euo pipefail
if [ -n "${NODE_AUTH_TOKEN:-}" ]; then
echo "NODE_AUTH_TOKEN must not be set for npm trusted publishing."
exit 1
fi
npm --version
- name: Publish to npm
run: npm publish ./dist/ngbootstrap --access public --provenance