name: Publish release on: release: types: [published] permissions: contents: read id-token: write jobs: publish: name: Publish runs-on: ubuntu-latest strategy: matrix: node-version: [lts/*] steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 persist-credentials: false - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: ${{ matrix.node-version }} cache: 'npm' 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