Skip to content
Merged
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
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ jobs:
needs: [ compile, test, verify-package ]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
# Trusted Publishing (OIDC), as schematic-js does: no NPM_TOKEN to expire.
# This workflow file must be registered as the package's trusted publisher
# on npmjs.com (repo SchematicHQ/schematic-node, workflow ci.yml).
permissions:
id-token: write
contents: read
steps:
- name: Checkout repo
uses: actions/checkout@v6
Expand All @@ -146,7 +152,6 @@ jobs:

- name: Publish to npm
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
publish() { # use latest npm to ensure OIDC support
npx -y npm@latest publish "$@"
}
Expand All @@ -165,5 +170,3 @@ jobs:
publish --access public
fi
fi
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}