A release must publish to npm with provenance. What does the workflow need?
AdvancedScenarioRunners, ARC, Monorepos & Releases
Answer
Situation read → npm provenance uses GitHub OIDC.
What I'd do →
- Workflow:
permissions: contents: read id-token: write steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: { node-version: 22, registry-url: "https://registry.npmjs.org" } - run: npm ci && npm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - Better: npm trusted publishing (OIDC) configured on npmjs.com for the repo and workflow, removing
NPM_TOKENentirely.
Why → Provenance links the package to the source and build; trusted publishing removes the long-lived token.
Interview tip → Mention trusted publishing exists for npm and PyPI now.
More on Runners, ARC, Monorepos & Releases
You must build on runners that can reach an internal Artifactory. Design the runner setup.AdvancedPersistent self-hosted runners keep failing because a previous job left files and Docker images. Fix the root cause.BeginnerDesign ARC for a company with Linux build jobs, Docker image builds, and GPU tests.AdvancedYou need to upgrade ARC across 10 clusters with zero dropped jobs. Plan it.AdvancedA monorepo has 30 services; every PR builds all of them. Redesign.AdvancedA monorepo deploys each service independently with its own version. How do you trigger and version releases?Advanced