mxschmitt commited on
Commit
4a7be8d
·
unverified ·
1 Parent(s): 1523338

devops: migrate to OIDC NPM publishing (#1068)

Browse files

https://github.com/microsoft/playwright/issues/37495

Files changed (1) hide show
  1. .github/workflows/publish.yml +5 -4
.github/workflows/publish.yml CHANGED
@@ -7,20 +7,21 @@ jobs:
7
  runs-on: ubuntu-latest
8
  permissions:
9
  contents: read
10
- id-token: write # Needed for npm provenance
11
  steps:
12
  - uses: actions/checkout@v4
13
  - uses: actions/setup-node@v4
14
  with:
15
  node-version: 18
16
  registry-url: https://registry.npmjs.org/
 
 
 
17
  - run: npm ci
18
  - run: npx playwright install --with-deps
19
  - run: npm run lint
20
  - run: npm run ctest
21
- - run: npm publish --provenance
22
- env:
23
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24
 
25
  publish-docker:
26
  runs-on: ubuntu-latest
 
7
  runs-on: ubuntu-latest
8
  permissions:
9
  contents: read
10
+ id-token: write # Required for OIDC
11
  steps:
12
  - uses: actions/checkout@v4
13
  - uses: actions/setup-node@v4
14
  with:
15
  node-version: 18
16
  registry-url: https://registry.npmjs.org/
17
+ # Ensure npm 11.5.1 or later is installed (for OIDC npm publishing)
18
+ - name: Update npm
19
+ run: npm install -g npm@latest
20
  - run: npm ci
21
  - run: npx playwright install --with-deps
22
  - run: npm run lint
23
  - run: npm run ctest
24
+ - run: npm publish
 
 
25
 
26
  publish-docker:
27
  runs-on: ubuntu-latest