Spaces:
Paused
Paused
devops: migrate to OIDC NPM publishing (#1068)
Browse fileshttps://github.com/microsoft/playwright/issues/37495
.github/workflows/publish.yml
CHANGED
|
@@ -7,20 +7,21 @@ jobs:
|
|
| 7 |
runs-on: ubuntu-latest
|
| 8 |
permissions:
|
| 9 |
contents: read
|
| 10 |
-
id-token: write
|
| 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
|
| 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
|