mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-22 10:41:41 +03:00
87 lines
2.9 KiB
YAML
87 lines
2.9 KiB
YAML
name: "publish canary"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "10 0 * * *"
|
|
push:
|
|
branches:
|
|
- release-*
|
|
|
|
jobs:
|
|
publish-canary:
|
|
name: "publish canary NPM & Publish canary Docker"
|
|
runs-on: ubuntu-20.04
|
|
if: github.repository == 'microsoft/playwright'
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 14
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- run: npm i -g npm@8
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: npx playwright install-deps
|
|
- name: "@next: publish with commit timestamp (triggered manually)"
|
|
if: contains(github.ref, 'main') && github.event_name == 'workflow_dispatch'
|
|
run: |
|
|
node utils/build/update_canary_version.js --alpha --commit-timestamp
|
|
utils/publish_all_packages.sh --alpha
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
- name: "@next: publish with today's date (triggered automatically)"
|
|
if: contains(github.ref, 'main') && github.event_name != 'workflow_dispatch'
|
|
run: |
|
|
node utils/build/update_canary_version.js --alpha --today-date
|
|
utils/publish_all_packages.sh --alpha
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
- name: "@beta: publish with commit timestamp (triggered automatically)"
|
|
if: contains(github.ref, 'release') && github.event_name != 'workflow_dispatch'
|
|
run: |
|
|
node utils/build/update_canary_version.js --beta --commit-timestamp
|
|
utils/publish_all_packages.sh --beta
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
- 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
|
|
- uses: azure/docker-login@v1
|
|
with:
|
|
login-server: playwright.azurecr.io
|
|
username: playwright
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: Set up Docker QEMU for arm64 docker builds
|
|
uses: docker/setup-qemu-action@v1
|
|
with:
|
|
platforms: arm64
|
|
- name: publish docker canary
|
|
run: ./utils/docker/publish_docker.sh canary
|
|
|
|
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:
|
|
node-version: 14
|
|
- run: npm i -g npm@8
|
|
- name: Deploy Canary
|
|
run: bash utils/build/deploy-trace-viewer.sh --canary
|
|
if: contains(github.ref, 'main')
|
|
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:
|
|
GH_SERVICE_ACCOUNT_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|