Skip to content

Commit

Permalink
Patchright Release [Workflows]
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinyzu committed Nov 2, 2024
1 parent f680452 commit 373a44b
Show file tree
Hide file tree
Showing 11 changed files with 246 additions and 473 deletions.
38 changes: 0 additions & 38 deletions .azure-pipelines/publish.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

193 changes: 0 additions & 193 deletions .github/workflows/ci.yml

This file was deleted.

87 changes: 87 additions & 0 deletions .github/workflows/patchright_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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
27 changes: 0 additions & 27 deletions .github/workflows/publish.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/publish_canary_docker.yml

This file was deleted.

Loading

0 comments on commit 373a44b

Please sign in to comment.