generated from SteamDeckHomebrew/decky-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from chenx-dust/main
feat: Switch to Mihomo
- Loading branch information
Showing
17 changed files
with
962 additions
and
403 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,15 +9,30 @@ jobs: | |
linux_amd64: | ||
name: Linux AMD64 | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
#build tomoon start | ||
- uses: actions/checkout@v3 | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
|
||
- name: download asset files | ||
run: wget https://github.com/YukiCoco/ToMoon/releases/download/build/build_assets.zip | ||
- run: unzip -n build_assets.zip -d tmp/ | ||
- name: Download Clash and Yacd | ||
run: | | ||
mkdir tmp && cd tmp | ||
mkdir core && cd core | ||
# Mihomo (Clash Meta) | ||
wget -O clash.gz https://github.com/MetaCubeX/mihomo/releases/download/v1.18.3/mihomo-linux-amd64-v1.18.3.gz | ||
gzip -d clash.gz | ||
# country.mmdb & geosite.dat | ||
wget https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/country.mmdb | ||
wget https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat | ||
wget -O asn.mmdb https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-ASN.mmdb | ||
# yacd | ||
wget -O yacd.zip https://github.com/MetaCubeX/yacd/archive/gh-pages.zip | ||
unzip yacd.zip | ||
mv Yacd-meta-gh-pages web | ||
# build front-end start | ||
- uses: actions/setup-node@v3 | ||
with: | ||
|
@@ -27,7 +42,7 @@ jobs: | |
version: 7.12.2 | ||
- name: Install Requestment | ||
run: | | ||
cp -r tmp/usdpl src/ | ||
cp -r usdpl src/ | ||
pnpm i | ||
- name: build front end | ||
run: pnpm run build | ||
|
@@ -40,13 +55,12 @@ jobs: | |
# build front-end end | ||
# build backend start | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ClementTsang/[email protected].2 | ||
- uses: ClementTsang/[email protected].6 | ||
with: | ||
command: build | ||
directory: ./backend | ||
args: --target x86_64-unknown-linux-gnu --release | ||
use-cross: true | ||
cross-version: 0.2.4 | ||
use-cross: false | ||
# build backend end | ||
#build tomoon stop | ||
#output: # ToMoon/backend/target/x86_64-unknown-linux-gnu/release/tomoon | ||
|
@@ -65,7 +79,7 @@ jobs: | |
# with: | ||
# node-version: 16 | ||
# - run: pnpm run build | ||
- name: colect files | ||
- name: collect files | ||
run: | | ||
mkdir -p ./release/tomoon/bin/core/web | ||
mkdir -p ./release/tomoon/dist | ||
|
@@ -75,7 +89,6 @@ jobs: | |
cp plugin.json ./release/tomoon/plugin.json | ||
cp package.json ./release/tomoon/package.json | ||
cp -r ./tmp/core ./release/tomoon/bin/ | ||
cp -r ./tmp/smartdns ./release/tomoon/bin/ | ||
cp -r ./tomoon-web/dist ./release/tomoon/web | ||
cp -r ./py_modules ./release/tomoon/py_modules | ||
cd ./release | ||
|
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 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
Oops, something went wrong.