Skip to content

Commit

Permalink
Update run.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
misha-tgshv authored Mar 9, 2025
1 parent 54956c9 commit a409a0a
Showing 1 changed file with 44 additions and 7 deletions.
51 changes: 44 additions & 7 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,44 @@ jobs:
name: rules
path: ./rules.d/

build_scripts_js:
runs-on: ubuntu-latest
steps:
- name: Создаем файл rewrite.youtube.response.preview.js
run: |
curl -sSL "https://raw.githubusercontent.com/Maasea/sgmodule/master/Script/Youtube/dist/youtube.response.preview.js" > temp.txt && sed 's/;e!/;e/g' temp.txt > rewrite.youtube.response.preview.js && rm temp.txt
- name: Перемещаем файлы в директорю scripts
run: |
mkdir -p scripts.d
cp *.js ./scripts.d/
- name: Загружаем список файлов sctipts через artifact
uses: actions/upload-artifact@v4
with:
name: scripts
path: ./scripts.d/

build_YT_premium_v1_module:
runs-on: ubuntu-latest
steps:
- name: Создаем файл YT-Premium-V1-RU.module
run: |
curl -sSL https://raw.githubusercontent.com/YanbingJiang/Shadowrocket_diy_rules/9b86dfbca387fa69e8d4b02d3f8ba01250eaad16/Modules/YT-Premium-V1.module \
| sed -E 's/captionLang:zh-Hans/captionLang:off/g; s/lyricLang:zh-Hans/lyricLang:ru-ru/g' > YT-Premium-V1-RU.module
sed -i 's/https:\/\/raw\.githubusercontent\.com\/Maasea\/sgmodule\/master\/Script\/Youtube\/dist\/youtube\.response\.preview\.js/https:\/\/raw\.githubusercontent\.com\/misha-tgshv\/shadowrocket-configuration-file\/refs\/heads\/release\/scripts\/rewrite\.youtube\.response\.preview\.js/g' YT-Premium-V1-RU.module
- name: Перемещаем файлы в директорю modules
run: |
mkdir -p modules.d
cp *.module ./modules.d/
- name: Загружаем список файлов modules через artifact
uses: actions/upload-artifact@v4
with:
name: modules
path: ./modules.d/

build_Shadowrocket_conf_file:
runs-on: ubuntu-latest
needs: build_rules_list
Expand Down Expand Up @@ -152,14 +190,13 @@ jobs:
# Добавляем дату сборки
sed -i "1s/^/# @misha-tgshv, built on $(TZ="Asia/Novokuznetsk" date)\n/" ./conf.d/sr_ru_public_lists.conf
- name: Создаем конфиг nonru.conf
- name: Создаем конфиг sr_basic_nonru.conf
run: |
# Копируем General.txt в nonru.conf
cp ./conf.d/General.txt ./conf.d/nonru.conf
# Добавляем правила для российских доменов в nonru.conf
cat <<EOF >> ./conf.d/nonru.conf
# Копируем General.txt в sr_basic_nonru.conf
cp ./conf.d/General.txt ./conf.d/sr_basic_nonru.conf
# Добавляем правила для российских доменов в sr_basic_nonru.conf
cat <<EOF >> ./conf.d/sr_basic_nonru.conf
# Выборочные правила маршрутизации
[Rule]
# Российские домены через прокси
Expand All @@ -175,7 +212,7 @@ jobs:
EOF
# Добавляем дату сборки
sed -i "1s/^/# @misha-tgshv, built on $(TZ="Asia/Novokuznetsk" date)\n/" ./conf.d/nonru.conf
sed -i "1s/^/# @misha-tgshv, built on $(TZ="Asia/Novokuznetsk" date)\n/" ./conf.d/sr_basic_nonru.conf
- name: Загружаем artifact
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit a409a0a

Please sign in to comment.