2021-11-02 13:01:49 +03:00
|
|
|
name: "publish canary"
|
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:
|
2021-11-02 13:01:49 +03:00
|
|
|
publish-canary:
|
2022-02-24 20:10:34 +03:00
|
|
|
name: "publish canary NPM & Publish canary Docker"
|
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:
|
2022-04-26 13:20:26 +03:00
|
|
|
node-version: 14
|
2020-04-21 03:45:29 +03:00
|
|
|
registry-url: 'https://registry.npmjs.org'
|
2022-01-29 18:56:50 +03:00
|
|
|
- run: npm i -g npm@8.3
|
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-11-02 12:35:03 +03:00
|
|
|
- name: "@next: publish with commit timestamp (triggered manually)"
|
2021-12-08 09:58:33 +03:00
|
|
|
if: contains(github.ref, 'main') && github.event_name == 'workflow_dispatch'
|
2021-11-02 12:35:03 +03:00
|
|
|
run: |
|
2021-11-17 02:38:14 +03:00
|
|
|
node utils/build/update_canary_version.js --alpha --commit-timestamp
|
|
|
|
utils/publish_all_packages.sh --alpha
|
2021-11-02 12:35:03 +03:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- name: "@next: publish with today's date (triggered automatically)"
|
2021-12-08 09:58:33 +03:00
|
|
|
if: contains(github.ref, 'main') && github.event_name != 'workflow_dispatch'
|
2021-11-02 03:29:56 +03:00
|
|
|
run: |
|
2021-11-17 02:38:14 +03:00
|
|
|
node utils/build/update_canary_version.js --alpha --today-date
|
|
|
|
utils/publish_all_packages.sh --alpha
|
2021-11-02 03:29:56 +03:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2021-11-02 12:35:03 +03:00
|
|
|
- name: "@beta: publish with commit timestamp (triggered automatically)"
|
|
|
|
if: contains(github.ref, 'release') && github.event_name != 'workflow_dispatch'
|
2021-11-02 03:29:56 +03:00
|
|
|
run: |
|
2021-11-17 02:38:14 +03:00
|
|
|
node utils/build/update_canary_version.js --beta --commit-timestamp
|
2021-11-02 03:29:56 +03:00
|
|
|
utils/publish_all_packages.sh --beta
|
2020-04-21 03:45:29 +03:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2021-11-17 02:38:14 +03:00
|
|
|
- name: build & publish driver
|
|
|
|
env:
|
|
|
|
AZ_UPLOAD_FOLDER: driver/next
|
|
|
|
AZ_ACCOUNT_KEY: ${{ secrets.AZ_ACCOUNT_KEY }}
|
|
|
|
AZ_ACCOUNT_NAME: ${{ secrets.AZ_ACCOUNT_NAME }}
|
|
|
|
run: |
|
|
|
|
utils/build/build-playwright-driver.sh
|
|
|
|
utils/build/upload-playwright-driver.sh
|
2021-12-08 02:28:47 +03:00
|
|
|
- uses: azure/docker-login@v1
|
|
|
|
with:
|
|
|
|
login-server: playwright.azurecr.io
|
|
|
|
username: playwright
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2021-12-08 03:17:30 +03:00
|
|
|
- name: Set up Docker QEMU for arm64 docker builds
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
with:
|
|
|
|
platforms: arm64
|
2021-12-08 02:28:47 +03:00
|
|
|
- name: publish docker canary
|
|
|
|
run: ./utils/docker/publish_docker.sh canary
|
2020-04-21 03:45:29 +03:00
|
|
|
|
2021-11-09 02:27:54 +03:00
|
|
|
publish-trace-viewer:
|
|
|
|
name: "publish Trace Viewer to trace.playwright.dev"
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
if: github.repository == 'microsoft/playwright'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
2022-04-26 17:59:47 +03:00
|
|
|
node-version: 14
|
2021-11-09 02:27:54 +03:00
|
|
|
- run: npm i -g npm@7
|
2021-11-10 04:21:51 +03:00
|
|
|
- name: Deploy Canary
|
|
|
|
run: bash utils/build/deploy-trace-viewer.sh --canary
|
2021-12-08 09:58:33 +03:00
|
|
|
if: contains(github.ref, 'main')
|
2021-11-10 04:21:51 +03:00
|
|
|
env:
|
|
|
|
GH_SERVICE_ACCOUNT_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
|
|
|
- name: Deploy BETA
|
|
|
|
run: bash utils/build/deploy-trace-viewer.sh --beta
|
|
|
|
if: contains(github.ref, 'release')
|
|
|
|
env:
|
2021-11-09 02:27:54 +03:00
|
|
|
GH_SERVICE_ACCOUNT_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|