playwright/.github/workflows/publish_canary_npm.yml
Ross Wollman cbd33f9601
devops: avoid running publish on external contrib (#3257)
Everytime I sync my fork to upstream, I get failure notifications:

```
Run failed for master (3edfb2a)
Repository: rwoll/playwright
Workflow: devrelease
Duration: 10 minutes and 34.0 seconds
Finished: 2020-07-31 18:30:13 UTC
```

Since forks should never have the necessary secrets to publish
the npm and Docker packages, we limit the running of these jobs to avoid
noisy failures for contributors.
2020-07-31 14:09:36 -07:00

31 lines
652 B
YAML

name: "devrelease"
on:
push:
branches:
- master
- release-*
env:
CI: true
jobs:
publish-canary-npm:
name: "publish to NPM"
runs-on: ubuntu-18.04
if: github.repository == 'microsoft/playwright'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10
registry-url: 'https://registry.npmjs.org'
- uses: microsoft/playwright-github-action@v1
- run: npm ci
- run: npm run build
- run: node utils/update_version.js --next
- run: utils/publish_all_packages.sh --tip-of-tree
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}