-
Notifications
You must be signed in to change notification settings - Fork 3.7k
79 lines (75 loc) · 2.63 KB
/
publish_canary.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: "publish canary"
on:
workflow_dispatch:
schedule:
- cron: "10 0 * * *"
push:
branches:
- release-*
env:
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
jobs:
publish-canary:
name: "publish canary NPM"
runs-on: ubuntu-20.04
if: github.repository == 'microsoft/playwright'
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- 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
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@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Deploy Canary
run: bash utils/build/deploy-trace-viewer.sh --canary
if: contains(github.ref, 'main')
env:
GH_SERVICE_ACCOUNT_TOKEN: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }}
- name: Deploy BETA
run: bash utils/build/deploy-trace-viewer.sh --beta
if: contains(github.ref, 'release')
env:
GH_SERVICE_ACCOUNT_TOKEN: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }}