2020-09-02 02:51:32 +03:00
|
|
|
name: "devrelease:npm"
|
2020-04-21 03:45:29 +03:00
|
|
|
|
|
|
|
on:
|
2021-06-04 00:50:40 +03:00
|
|
|
workflow_dispatch:
|
2021-02-10 01:28:04 +03:00
|
|
|
schedule:
|
|
|
|
- cron: "10 0 * * *"
|
2020-04-21 03:45:29 +03:00
|
|
|
push:
|
|
|
|
branches:
|
2020-04-22 05:20:19 +03:00
|
|
|
- release-*
|
2020-04-21 03:45:29 +03:00
|
|
|
|
|
|
|
jobs:
|
2020-07-14 03:15:10 +03:00
|
|
|
publish-canary-npm:
|
|
|
|
name: "publish to NPM"
|
2021-04-05 22:39:15 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2020-08-01 00:09:36 +03:00
|
|
|
if: github.repository == 'microsoft/playwright'
|
2020-04-21 03:45:29 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-04-05 22:39:15 +03:00
|
|
|
- uses: actions/setup-node@v2
|
2020-04-21 03:45:29 +03:00
|
|
|
with:
|
2021-04-30 17:49:10 +03:00
|
|
|
node-version: 12
|
2020-04-21 03:45:29 +03:00
|
|
|
registry-url: 'https://registry.npmjs.org'
|
2021-10-11 17:52:17 +03:00
|
|
|
- run: npm i -g npm@7
|
2020-04-21 03:45:29 +03:00
|
|
|
- run: npm ci
|
2020-07-02 01:22:29 +03:00
|
|
|
- run: npm run build
|
2021-10-11 17:52:17 +03:00
|
|
|
- run: npx playwright install-deps
|
2021-02-10 01:28:04 +03:00
|
|
|
- run: node utils/build/update_canary_version.js --today-date
|
2021-06-04 00:50:40 +03:00
|
|
|
if: contains(github.ref, 'master') && github.event_name != 'workflow_dispatch'
|
2021-02-10 01:28:04 +03:00
|
|
|
- run: node utils/build/update_canary_version.js --commit-timestamp
|
2021-06-04 00:50:40 +03:00
|
|
|
if: contains(github.ref, 'release') || github.event_name == 'workflow_dispatch'
|
2020-04-21 03:45:29 +03:00
|
|
|
- run: utils/publish_all_packages.sh --tip-of-tree
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
|