mirror of
https://github.com/zen-browser/desktop.git
synced 2026-02-08 04:47:13 +00:00
chore: New upstream fetch script, p=#11253, c=workflows, scripts
* chore: New upstream fetch script, b=no-bug, c=workflows, scripts Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com> --------- Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Check for any updates
|
||||
env:
|
||||
|
||||
7
.github/workflows/pr-test.yml
vendored
7
.github/workflows/pr-test.yml
vendored
@@ -21,14 +21,11 @@ jobs:
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install Surfer
|
||||
run: npm i -g @zen-browser/surfer
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Download Firefox and dependencies
|
||||
run: surfer download
|
||||
run: npm run download
|
||||
|
||||
- name: Import patches
|
||||
run: surfer i
|
||||
run: npm run import
|
||||
|
||||
87
.github/workflows/sync-upstream.yml
vendored
Normal file
87
.github/workflows/sync-upstream.yml
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
name: Sync Upstream Firefox Releases
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '59 4 * * 2'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_candidate:
|
||||
description: 'Set to true to sync release candidates'
|
||||
required: false
|
||||
default: 'false'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
check_candidates:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Sync Upstream Releases
|
||||
run: |
|
||||
if [ "${{ github.event.inputs.release_candidate }}" = "true" ]; then
|
||||
npm run sync:rc
|
||||
else
|
||||
npm run sync
|
||||
fi
|
||||
|
||||
- name: Check if any files changed
|
||||
id: git-check
|
||||
run: |
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "files_changed=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "files_changed=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Get Firefox Version
|
||||
id: build-data
|
||||
if: steps.git-check.outputs.files_changed == 'true'
|
||||
run: |
|
||||
if [ "${{ github.event.inputs.release_candidate }}" = "true" ]; then
|
||||
VERSION=$(node -pe "require('./surfer.json').version.candidate")
|
||||
else
|
||||
VERSION=$(node -pe "require('./surfer.json').version.version")
|
||||
fi
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check if patches got applied
|
||||
if: steps.git-check.outputs.files_changed == 'true'
|
||||
id: check-patches
|
||||
continue-on-error: true
|
||||
run: |
|
||||
echo "Checking if patches apply cleanly..."
|
||||
npm run import
|
||||
|
||||
- name: Create pull request
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
if: steps.git-check.outputs.files_changed == 'true'
|
||||
env:
|
||||
GIT_TRACE: 1
|
||||
GIT_CURL_VERBOSE: 1
|
||||
with:
|
||||
token: ${{ secrets.DEPLOY_KEY }}
|
||||
commit-message: 'chore: Sync upstream to `Firefox ${{ steps.build-data.outputs.version }}`'
|
||||
branch: 'chore/sync-upstream-${{ steps.build-data.outputs.version }}'
|
||||
title: 'Sync upstream Firefox to version ${{ steps.build-data.outputs.version }}'
|
||||
body: |
|
||||
This PR syncs the upstream Firefox to version ${{ steps.build-data.outputs.version }}.
|
||||
|
||||
* ${{ steps.check-patches.outcome == 'failure' && '⚠️ Some patches did not apply cleanly. Please review them carefully.' || '✅ All patches applied cleanly.' }}
|
||||
|
||||
@${{ github.actor }} please review and merge this PR.
|
||||
base: dev
|
||||
git-token: ${{ secrets.DEPLOY_KEY }}
|
||||
delete-branch: true
|
||||
Reference in New Issue
Block a user