diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 137e2e58..f55a70a8 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -185,12 +185,34 @@ jobs: cd custom || exit 1 go run ./ --datapath=../community/data + - name: Build geosite-lite.dat file + env: + NO_SKIP: true + run: | + cd community || exit 1 + mkdir -p data-lite + curl -sSL https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/ChinaMax/ChinaMax_Domain.txt | sed '/^\s*#/d' | sed '/^[^\.]/ s/^/full:/' | sed 's/^\.\([^.]*\)/\1/' > cn + curl -sSL https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/cn.txt | perl -ne '/^(domain):([^:]+)(\n$|:@.+)/ && print "$2\n"' >> cn + curl -sSL https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/cn.txt | perl -ne '/^((full|regexp|keyword):[^:]+)(\n$|:@.+)/ && print "$1\n"' | sort --ignore-case -u >> cn + sort ./cn | uniq -i > data-lite/cn + go run ./ --datapath=./data-lite --outputname geosite-lite.dat + - name: Checkout SagerNet/sing-geosite uses: actions/checkout@v3 with: repository: SagerNet/sing-geosite path: sing-geosite + + - name: Build geosite-lite.db file + env: + NO_SKIP: true + run: | + cd sing-geosite || exit 1 + cp ../community/geosite-lite.dat ./ + go run -v . geosite-lite.dat geosite.db + mv geosite.db geosite-lite.db + - name: Build geosite.db file env: NO_SKIP: true @@ -231,6 +253,8 @@ jobs: install -Dp ./geoip.dat ./publish/ install -Dp ./custom/publish/geosite.dat ./publish/ install -Dp ./sing-geosite/geosite.db ./publish/ + install -Dp ./community/geosite-lite.dat ./publish/ + install -Dp ./sing-geosite/geosite-lite.db ./publish/ install -Dp ./sing-geoip/geoip.db ./publish/ install -Dp ./sing-geoip/cn.db ./publish/ curl -sSL https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/ChinaMax/ChinaMax_Domain.yaml | sed '/^\s*#/d' > ./publish/cn_domain.yaml