playwright/.github/workflows/publish_release_npm.yml
Max Schmitt ba207697c3
devops: don't force NPM 8 everywhere (#27465)
We used to have this historically due to bots which were running on
Node.js 14. Node.js 14 was shipping NPM 7 back in the days.

Now all bots are on >= Node.js 16 so we can remove this legacy code.
2023-10-05 22:21:00 +00:00

35 lines
875 B
YAML

name: "publish release - NPM"
on:
release:
types: [published]
env:
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
jobs:
publish-npm-release:
name: "publish to NPM"
runs-on: ubuntu-20.04
if: github.repository == 'microsoft/playwright'
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- run: npx playwright install-deps
- run: utils/publish_all_packages.sh --release-candidate
if: "github.event.release.prerelease"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: utils/publish_all_packages.sh --release
if: "!github.event.release.prerelease"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}