-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (76 loc) · 2.27 KB
/
patchright_workflow.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
80
81
82
83
84
85
86
87
name: PatchRight Workflow
on:
# enabling manual trigger
workflow_dispatch:
inputs:
version:
description: 'Playwright Version'
default: ''
# running every hour
schedule:
- cron: '48 * * * *'
permissions:
actions: none
attestations: none
checks: none
contents: write
deployments: none
id-token: none
issues: none
discussions: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
env:
REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
patchright-workflow:
name: "Patchright Workflow: Install, Patch, Build and Publish Patchright Driver"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup Node v18
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Install TS-Morph
run: npm install
- name: Check Release Version
id: version_check
run: |
if [ -n "${{ github.event.inputs.version }}" ]; then
echo "proceed=true" >>$GITHUB_OUTPUT
echo "playwright_version=${{ github.event.inputs.version }}" >> $GITHUB_ENV
else
chmod +x utils/release_version_check.sh
utils/release_version_check.sh
fi
- name: Install Playwright Driver
if: steps.version_check.outputs.proceed == 'true'
run: |
git clone https://github.com/microsoft/playwright --branch ${{ env.playwright_version }}
cd playwright
npm ci
- name: Patch Playwright Driver
if: steps.version_check.outputs.proceed == 'true'
run: |
cd playwright
node "../patchright_driver_patch.js"
- name: Build Patchright Driver
if: steps.version_check.outputs.proceed == 'true'
run: |
cd playwright
npm run build
npx playwright install-deps
chmod +x utils/build/build-playwright-driver.sh
utils/build/build-playwright-driver.sh
- name: Publish Patchright Driver
if: steps.version_check.outputs.proceed == 'true'
run: |
chmod +x utils/release_driver.sh
utils/release_driver.sh