Skip to content

Commit 1457c96

Browse files
committed
Set up OIDC publishing
1 parent 484911c commit 1457c96

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/snapshot.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [created]
66

77
env:
8-
npm-token: ${{ secrets.NPM_TOKEN }}
8+
# npm-token: ${{ secrets.NPM_TOKEN }}
99
github-token: ${{ secrets.GITHUB_TOKEN }}
1010
node-version: '22.x'
1111
release-tag: pr${{ github.event.issue.number }}-run${{ github.run_number }}-${{ github.run_attempt }}
@@ -57,7 +57,9 @@ jobs:
5757
runs-on: ubuntu-24.04
5858
needs: release-check
5959
permissions:
60-
pull-requests: write
60+
id-token: write # allows ODIC publishing
61+
contents: read
62+
pull-requests: write # allows posting a message to the PR about success/error
6163
if: needs.release-check.outputs.triggered == 'true'
6264
steps:
6365
- name: Get Pull Request ref
@@ -76,23 +78,25 @@ jobs:
7678
with:
7779
persist-credentials: true
7880
repository: ${{ fromJson(steps.get_pull_request_ref.outputs.data).head.repo.full_name }}
79-
ref: ${{ fromJson(steps.get_pull_request_ref.outputs.data).head.ref }}
81+
# ref: ${{ fromJson(steps.get_pull_request_ref.outputs.data).head.ref }}
82+
ref: refs/pull/${{ github.event.issue.number }}/head
8083

8184
- name: Set up Node.js
8285
uses: actions/setup-node@v4
8386
with:
8487
node-version: ${{ env.node-version }}
88+
registry-url: 'https://registry.npmjs.org'
8589
cache: yarn
8690
cache-dependency-path: '**/yarn.lock'
8791

8892
- name: Install deps
8993
run: yarn install --prefer-offline
9094

91-
- name: Configure NPM
92-
run: |
93-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
94-
env:
95-
NPM_TOKEN: ${{ env.npm-token }}
95+
# - name: Configure NPM
96+
# run: |
97+
# echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
98+
# env:
99+
# NPM_TOKEN: ${{ env.npm-token }}
96100

97101
- name: Deploy snapshot
98102
run: |

0 commit comments

Comments
 (0)