chore(npm): attempt to fix issue with Trusted Publishers when using reusable workflows #30787
+130
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number: resolves #
What is the current behavior?
.github/workflows/in your repository.What is the new behavior?
Fixed permissions mismatch by applying the orchestrator method for npm publish:
release-orchestrator.yml (contents: read, id-token: write)
├─→ nightly.yml (contents: read, id-token: write)
│ └─→ release-ionic.yml (contents: read, id-token: write)
│ └─→ publish-npm.yml (contents: read, id-token: write) ✅
├─→ dev-build.yml (contents: read, id-token: write)
│ └─→ release-ionic.yml (contents: read, id-token: write)
│ └─→ publish-npm.yml (contents: read, id-token: write) ✅
└─→ release.yml (contents: read, id-token: write)
└─→ release-ionic.yml (contents: read, id-token: write)
└─→ publish-npm.yml (contents: read, id-token: write) ✅
release-orchestrator.ymlcalls three workflows:nightly.yml,dev-build.yml, andrelease.yml.All three call
release-ionic.yml, which handles publishing multiple packages.release-ionic.ymlcallspublish-npm.ymlmultiple times (once per package).All workflows have
contents: readandid-token: writepermissions.publish-npm.ymlis in.github/workflows/, which satisfies npm Trusted Publishers requirements.This shows that
publish-npm.ymlis reachable through all three release paths, and moving it to.github/workflows/ensures npm Trusted Publishers can authenticate it correctly.Does this introduce a breaking change?
Other information
release-orchestrator.ymlneeds to be the one set up in the npm package settings for the Trusted Publishers