Pull Upstream #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
name: Pull Upstream | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: "nyanrus_release" | |
fetch-depth: 0 | |
- name: clone upstream | |
run: | | |
git clone -b release --single-branch https://github.com/mozilla/gecko-dev --depth 1 upstream_release | |
rm -rf ./upstream_release/.git ./upstream_release/.github | |
mv ./upstream_release/README.txt ./upstream_release/MOZ_README.txt | |
- name: copy upstream to this_repo | |
run: | | |
rsync -aq --progress upstream_release/ temp_release | |
cp -r ./nyanrus_release/.git temp_release | |
cp -r ./nyanrus_release/.github temp_release | |
cp ./nyanrus_release/.gitmodules temp_release | |
cp -r ./nyanrus_release/noraneko temp_release | |
cp ./nyanrus_release/README.md temp_release | |
- id: apply-git-patches | |
name: apply git patches | |
continue-on-error: true | |
run: | | |
cd temp_release | |
git apply --ignore-space-change --reject --ignore-whitespace .github/patches/upstream/*.patch | |
cp -f .github/assets/installer/setup.ico other-licenses/7zstub/firefox/setup.ico | |
cp -f .github/assets/installer/7zSD.ARM64.sfx other-licenses/7zstub/firefox/7zSD.ARM64.sfx | |
cp -f .github/assets/installer/7zSD.Win32.sfx other-licenses/7zstub/firefox/7zSD.Win32.sfx | |
- name: detect patch error | |
if: ${{ steps.apply-git-patches.outcome == 'failure' }} | |
run: | | |
echo "Patch Error!" | |
exit 1 | |
- name: push | |
run: | | |
cd temp_release | |
export FF_VERSION=$(cat browser/config/version.txt) | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "sync upstream gecko-dev $FF_VERSION" | |
git push |