Skip to content

Commit 94c1543

Browse files
authored
Adjust permissions in release package workflow (#1751)
The `id-token: write` permission seems required for Open ID Connect (OIDC). Publication to npm cannot succeed without it. The `contents: write` permission should also be needed to set release tags. See https://docs.npmjs.com/trusted-publishers#step-2-configure-your-cicd-workflow Underlying issue: #1739.
1 parent 44c33ea commit 94c1543

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/release-package.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44

55
name: "Publish @webref package if needed"
66

7+
permissions:
8+
# Required to create/update references (release tags),
9+
# includes "read", which is needed to retrieve a PR:
10+
# https://docs.github.com/en/rest/git/refs#create-a-reference--fine-grained-access-tokens
11+
# https://docs.github.com/en/rest/pulls/pulls#get-a-pull-request--fine-grained-access-tokens
12+
contents: write
13+
14+
# Required for Open ID Connect (OIDC) authentication for npm publication:
15+
# https://docs.npmjs.com/trusted-publishers#github-actions-configuration
16+
id-token: write
17+
718
on:
819
pull_request:
920
branches:

0 commit comments

Comments
 (0)