Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

Check warning on line 4 in .github/workflows/npm-publish-github-packages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

npm-publish-github-packages.yml:4: overly broad permissions: default permissions used due to no permissions: block

on:
release:
types: [created]

jobs:
build:

Check warning on line 11 in .github/workflows/npm-publish-github-packages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

npm-publish-github-packages.yml:11: overly broad permissions: default permissions used due to no permissions: block
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Check failure on line 14 in .github/workflows/npm-publish-github-packages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 14 in .github/workflows/npm-publish-github-packages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

npm-publish-github-packages.yml:14: unpinned action reference: action is not pinned to a hash (required by blanket policy)
- uses: actions/setup-node@v4

Check failure on line 15 in .github/workflows/npm-publish-github-packages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 15 in .github/workflows/npm-publish-github-packages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

npm-publish-github-packages.yml:15: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
node-version: 20
- run: npm ci
- run: npm test

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4

Check failure on line 28 in .github/workflows/npm-publish-github-packages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 28 in .github/workflows/npm-publish-github-packages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

npm-publish-github-packages.yml:28: unpinned action reference: action is not pinned to a hash (required by blanket policy)
- uses: actions/setup-node@v4

Check failure on line 29 in .github/workflows/npm-publish-github-packages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 29 in .github/workflows/npm-publish-github-packages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

npm-publish-github-packages.yml:29: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish

Check notice on line 34 in .github/workflows/npm-publish-github-packages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

use-trusted-publishing

npm-publish-github-packages.yml:34: prefer trusted publishing for authentication: this command
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
Loading