Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新打包脚本 #208

Merged
merged 33 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b530c71
update no_proxy
jingjingxyk Jun 20, 2024
b05806e
test firefox
jingjingxyk Jun 20, 2024
8257723
delete invalid option url
jingjingxyk Jul 17, 2024
2c82c10
update describe
jingjingxyk Jul 17, 2024
3c6d197
format code
jingjingxyk Jul 17, 2024
e956eb8
update README.md
jingjingxyk Jul 17, 2024
6429f31
update README.md
jingjingxyk Jul 17, 2024
27a5f86
update README.md
jingjingxyk Jul 17, 2024
14a6e11
update README.md
jingjingxyk Jul 17, 2024
1165a13
format code
jingjingxyk Jul 17, 2024
0cc0e09
update net-detect.md
jingjingxyk Jul 17, 2024
45bf76c
Merge branch 'feature-delete-url' into dev
jingjingxyk Jul 17, 2024
0673e9b
update README.md
jingjingxyk Jul 17, 2024
30edd12
Merge branch 'master' into dev
jingjingxyk Jul 17, 2024
5612440
fix description error
jingjingxyk Jul 27, 2024
e8ccc8a
add setup nodejs runtime
jingjingxyk Aug 1, 2024
6cae0a0
test firefox
jingjingxyk Aug 2, 2024
67fd22f
更新打包
jingjingxyk Aug 2, 2024
70377a3
update workflow config
jingjingxyk Aug 2, 2024
1415d3b
update workflow config
jingjingxyk Aug 2, 2024
427ac1f
update workflow config
jingjingxyk Aug 2, 2024
4c8a402
update workflow config
jingjingxyk Aug 2, 2024
939389f
update changelog
jingjingxyk Aug 2, 2024
3178cd7
update workflow
jingjingxyk Aug 2, 2024
23bfbc0
更新打包
jingjingxyk Aug 2, 2024
2a67536
update README.md
jingjingxyk Aug 2, 2024
0314604
update mainifest
jingjingxyk Aug 2, 2024
feb6113
update
jingjingxyk Aug 2, 2024
69c9175
update
jingjingxyk Aug 2, 2024
3b804f6
update script
jingjingxyk Aug 2, 2024
edb88fa
format script
jingjingxyk Aug 2, 2024
0bb4d7a
update
jingjingxyk Aug 2, 2024
cfefec7
update
jingjingxyk Aug 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ max_line_length = 120

[*.{html,xml}]
indent_size = 4
indent_style = space

[*.{sh,bash}]
indent_size = 2
indent_style = space
42 changes: 19 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-replace-google-cdn
name: build

on:
push:
Expand All @@ -10,7 +10,7 @@ jobs:
if: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Prepare Source Code
run: |
lscpu
Expand All @@ -23,52 +23,58 @@ jobs:
cat /etc/os-release
hostnamectl
uname -s
uname -m
uname -m
uname -r
node -v

- name: Build
run: |
bash release-archive.sh
bash release-archive-v3.sh
ls -lah dist

- name: production artifacts v2
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: replace-google-cdn-v2
retention-days: 7
retention-days: 90
path: |
dist/ReplaceGoogleCDN-v2.zip

- name: production artifacts v3
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: replace-google-cdn-v3
retention-days: 7
path: |
dist/ReplaceGoogleCDN-v3.zip

- name: Build v3
run: |
bash release-archive-v3.sh
ls -lah dist

- name: production artifacts v3 chromium
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: replace-google-cdn-v3-chromium
retention-days: 7
path: |
dist/ReplaceGoogleCDN-v3-chromium.zip

- name: production artifacts v3 firefox
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: replace-google-cdn-v3-firefox
retention-days: 7
path: |
dist/ReplaceGoogleCDN-v3-firefox.zip

- name: Release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/ReplaceGoogleCDN-v2.zip
dist/ReplaceGoogleCDN-v3.zip
dist/ReplaceGoogleCDN-v3-chromium.zip
dist/ReplaceGoogleCDN-v3-firefox.zip

- name: Browser Plugin Publish v2
if: 0
uses: PlasmoHQ/bpp@v2
Expand All @@ -83,13 +89,3 @@ jobs:
artifact: "dist/ReplaceGoogleCDN-v3.zip"
keys: ${{ secrets.SUBMIT_KEYS }}
# 使用参考 https://github.com/PlasmoHQ/bpp.git

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/ReplaceGoogleCDN-v2.zip
dist/ReplaceGoogleCDN-v3.zip
dist/ReplaceGoogleCDN-v3-chromium.zip
dist/ReplaceGoogleCDN-v3-firefox.zip
10 changes: 5 additions & 5 deletions .github/workflows/linux-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Prepare Source Code
run: |
echo $PATH
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
sudo apt install -y supervisor socat

- name: Cache Chromium
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
install-build-deps.py
Expand All @@ -78,7 +78,7 @@ jobs:
fi

- name: Cache Firefox
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/var/firefox.tar.bz2
Expand All @@ -97,7 +97,7 @@ jobs:
shell: bash
run: |
ls -lha var/
var/chrome-linux/chrome --version
var/chrome-linux/chrome --version
var/firefox/firefox --version

- name: Chromium Load Extension
Expand All @@ -106,7 +106,7 @@ jobs:
# bash tools/chromium.sh --xvfb
# bash tools/chromium.sh --headless
nohup bash tools/chromium.sh --xvfb &
sleep 15
sleep 15
bash tools/chromium-auto-test.sh

- name: Firefox Load Extension
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/macos-aarch64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: macos-aarch64

on: [push, pull_request]

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
macos-x86_64:
if: 1
runs-on: macos-latest
# macos-latest (macos-14) 变更了 CPU 架构,由 x86_64 变更为 arm64
# macos-14 CPU 架构 arm64
# macos-13 CPU 架构 x86_64
# macos-12 CPU 架构 x86_64
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners
steps:
- uses: actions/checkout@v4
- name: Prepare build environment
run: |
env
echo $HOME

brew config

brew install wget curl

softwareupdate --list --verbose

ls -lh $(xcrun --show-sdk-path)

ifconfig

export IPV6=$(ifconfig en0 | grep "inet6 " | grep -v "inet6 fe80:" | awk '{print $2}' | cut -d'/' -f1 | sed -n '2p')
export IPV4=$(ifconfig en0 | grep "inet " | grep -v 127.0.0 | awk '{print $2}' | cut -d'/' -f1 | sed -n '1p')
echo $IPV4
echo $IPV6
echo "X_IPV6=${IPV6}" >> $GITHUB_ENV
echo "X_IPV4=${IPV4}" >> $GITHUB_ENV

echo ${{ env.BRANCH_NAME }}
echo ${{ github.actor }}
echo ${{ github.repository }}
echo ${{ github.repository_owner }}
echo ${{ github.head_ref }}
echo ${{ github.ref_name }}

- name: Prepare Chromium Run Environment
run: |
set -x

- name: Cache Chromium
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/var/chrome-mac.zip
${{ github.workspace }}/var/chrome-mac
key: ${{ runner.os }}-aarch64-chromium

- name: Download Chromium
run: |
set -x
if [ ! -f ${{ github.workspace }}/var/chrome-mac.zip ] ; then
bash tools/download-chromium.sh
fi

- name: Cache Firefox
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/var/firefox.dmg
${{ github.workspace }}/var/firefox/
key: ${{ runner.os }}-x86_64-firefox

- name: Download Firefox
shell: bash
run: |
set -x
if [ ! -f ${{ github.workspace }}/var/firefox.dmg ] ; then
bash tools/download-firefox.sh
fi

- name: show browser version
shell: bash
run: |
ls -lha var/
var/chrome-mac/Chromium.app/Contents/MacOS/Chromium --version
var/firefox/Firefox.app/Contents/MacOS/firefox --version
16 changes: 11 additions & 5 deletions .github/workflows/macos-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@ env:
jobs:
macos-x86_64:
if: 1
runs-on: macos-latest
runs-on: macos-13
# macos-latest (macos-14) 变更了 CPU 架构,由 x86_64 变更为 arm64
# macos-14 CPU 架构 arm64
# macos-13 CPU 架构 x86_64
# macos-12 CPU 架构 x86_64
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Prepare build environment
run: |
env
echo $HOME

brew config

brew install wget curl
brew install wget curl

softwareupdate --list --verbose

Expand All @@ -45,7 +51,7 @@ jobs:
set -x

- name: Cache Chromium
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/var/chrome-mac.zip
Expand All @@ -60,7 +66,7 @@ jobs:
fi

- name: Cache Firefox
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/var/firefox.dmg
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
pwd
ipconfig /all

- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Prepare Chromium Run Environment
run: |
ipconfig /all

- name: Cache Chromium
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}\var\chrome-win.zip
Expand All @@ -42,7 +42,7 @@ jobs:
fi

- name: Cache Firefox
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}\var\firefox.exe
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ tools/blocked-domain.py
tools/web/proxy.pac
dist
var
bin
Loading
Loading