playwright/.github/workflows/publish_canary_npm.yml
Andrey Lushnikov 1240dd48cb
devops: start publishing canary at midnight every day (#5343)
This patch:
- starts publishing canary NPM package at 00:10AM UTC
- canary version is published from default (`master`) branch and is 
  named with a date. E.g. for a version published on Feb 5, 2021, the
  version would be `1.8.0-alpha-feb-5-2021`
- versions from release branches are still published on every commit and have the 
  regular commit timestamp suffix
2021-02-09 14:28:04 -08:00

32 lines
835 B
YAML

name: "devrelease:npm"
on:
schedule:
- cron: "10 0 * * *"
push:
branches:
- release-*
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/build/update_canary_version.js --today-date
if: contains(github.ref, "master")
- run: node utils/build/update_canary_version.js --commit-timestamp
if: contains(github.ref, "release")
- run: utils/publish_all_packages.sh --tip-of-tree
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}