This PR switches from `npm install` to `npm ci` on CI. This enables some additional checks to ensure repo integrity when using CI/CD. Read more: https://docs.npmjs.com/cli/v10/commands/npm-ci
39 lines
826 B
YAML
39 lines
826 B
YAML
name: Publish release
|
|
on:
|
|
release:
|
|
types: [published]
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [lts/*]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build the `pdfjs-dist` library
|
|
run: npx gulp dist
|
|
|
|
- name: Publish the `pdfjs-dist` library to NPM
|
|
run: npm publish ./build/dist
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|