Skip to content

Commit

Permalink
合并 Essential 分支部分修改
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzdyl committed Nov 3, 2023
1 parent b5768b6 commit caabd6e
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 41 deletions.
65 changes: 35 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: release
on:
push:
paths:
- "module.json"
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@main
- name: 1. 准备文件
run: |
echo "version=$(jq .version $GITHUB_WORKSPACE/module.json)" >> $GITHUB_ENV
echo "versionCode=$(jq .versionCode $GITHUB_WORKSPACE/module.json)" >> $GITHUB_ENV
echo "version=$(jq -r .version $GITHUB_WORKSPACE/module.json)" >> $GITHUB_ENV
echo "versionCode=$(jq -r .versionCode $GITHUB_WORKSPACE/module.json)" >> $GITHUB_ENV
echo "ModuleFolderName=module_files" >> $GITHUB_ENV
- name: 2. 制作模块
run: |
Expand All @@ -21,40 +21,45 @@ jobs:
echo "versionCode=${{ env.versionCode }}" >>$GITHUB_WORKSPACE/${{ env.ModuleFolderName }}/module.prop
cd $GITHUB_WORKSPACE/${{ env.ModuleFolderName }}
zip -q -r ${{ env.ModuleFolderName }}.zip *
mv $GITHUB_WORKSPACE/${{ env.ModuleFolderName }}/${{ env.ModuleFolderName }}.zip "$GITHUB_WORKSPACE"/GithubRelease/${{ env.ModuleFolderName }}.zip
cd "$GITHUB_WORKSPACE"
touch file.log
echo "${{ env.ModuleFolderName }}.zip" > file.log
mv $GITHUB_WORKSPACE/${{ env.ModuleFolderName }}/${{ env.ModuleFolderName }}.zip "$GITHUB_WORKSPACE"/GithubRelease
- name: 3.上传到Github Release
uses: ncipollo/release-action@main
with:
artifacts: ${{ github.workspace }}/GithubRelease/*
name: "${{ env.ModuleFolderName }} ${{ env.version }}"
name: "OneUI_CSC_Features ${{ env.version }}"
tag: "${{ env.version }}"
bodyFile: "${{ github.workspace }}/file.log"
bodyFile: ${{ github.workspace }}/changelog.md # 使用 changelog.md 作为版本描述
allowUpdates: true
artifactErrorsFailBuild: true
- name: 4. 再次初始化仓库
makeLatest: true
- name: 4. 更新下载链接
run: |
rm -rf $GITHUB_WORKSPACE/*
- uses: actions/checkout@v2
- name: 5. 更新下载链接
run: |
git config --global user.email "[email protected]"
git config --global user.email "[email protected]"
git config --global user.name "Mzdyl"
sed -i '4d' $GITHUB_WORKSPACE/module.json
browser_download_url=$(curl -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/OWNER/REPO/releases/tags/'${{ env.version }}' | jq .assets[].browser_download_url | cut -d'"' -f2)
browser_download_url=$(curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ github.token }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/OWNER/REPO/releases/tags/${{ env.version }} | jq -r .assets[].browser_download_url | cut -d'"' -f2)
sed -i '3a "zipUrl": "https://ghproxy.com/'"$browser_download_url"'",' $GITHUB_WORKSPACE/module.json
jq . $GITHUB_WORKSPACE/module.json > $GITHUB_WORKSPACE/new.json
rm -rf $GITHUB_WORKSPACE/module.json && mv $GITHUB_WORKSPACE/new.json $GITHUB_WORKSPACE/module.json
git add ./module.json
# if git commit -m "v${{ env.version }}"; then
# echo "push=true" >> $GITHUB_ENV
# else
# echo "push=false" >> $GITHUB_ENV
# fi
# - if: ${{ env.push == 'true' }}
# name: 6. 推送到Magisk Module仓库
# uses: ad-m/github-push-action@master
# with:
# branch: ${{ github.ref }}
if git commit -m "v${{ env.version }}"; then
echo "push=true" >> $GITHUB_ENV
else
echo "push=false" >> $GITHUB_ENV
fi
# - name: 5. 更新 .gitattributes
# run: |
# # 请在引号内自行更新您的Github账号信息
# git config --global user.email "[email protected]"
# # 请在引号内自行更新您的Github账号信息
# git config --global user.name "Mzdyl"
# sed -i 's/module_files/${{ env.ModuleFolderName }}/g' $GITHUB_WORKSPACE/.gitattributes
# git add ./.gitattributes
# if git commit -m "更新 .gitattributes"; then
# echo "更新 .gitattributes: Success!"
# fi
# - if: ${{ env.push == 'true' }}
# name: 6. 推送到Magisk Module仓库
# uses: ad-m/github-push-action@master
# with:
# branch: ${{ github.ref }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#### app 目录变更

添加应用分身全app支持
~~添加应用分身全app支持~~

添加 中国隐藏选项菜单

Expand All @@ -36,11 +36,11 @@

#### priv-app 目录变更

添加 应用锁
~~添加 应用锁~~

替换 国行负一屏

添加 Bixby 识屏
~~添加 Bixby 识屏~~

添加 骚扰拦截

Expand Down
6 changes: 3 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
完善CSC的自动适配(BTU 测试通过)
代码整理
移除对 多开 的支持
KSU支持?
禁止锁帧
替换240HZ采样率实现
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "v1.1",
"versionCode": 11,
"zipUrl": "https://github.com/Mzdyl/OneUI_CSC_Features/releases/download/v1.1/OneUI_CSC_Features.zip",
"changelog": "https://ghproxy.com/https://github.com/Mzdyl/OneUI_CSC_Features/blob/main/changelog.md"
"zipUrl": "",
"changelog": "https://raw.githubusercontent.com/Mzdyl/OneUI_CSC_Features/main/changelog.md"
}
7 changes: 5 additions & 2 deletions module_files/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,14 @@ else
rm -rf "$MODPATH/system/app/MdxKitService"
fi

ui_print "移植 Fresh 系统相关功能代码"

ui_print "添加 切换至使用更好的 WLAN 网络"
settings put global sem_wifi_switch_to_better_wifi_supported 1
ui_print "添加 关闭 ADB 安装验证"
settings put global verifier_verify_adb_installs 0
ui_print "添加 禁用锁帧"
ui_print "添加 强制全局240Hz采样率"

ui_print "软件增删改详见 README.md"
set_perm_recursive $MODPATH 0 0 0777 0777


Expand Down
2 changes: 1 addition & 1 deletion module_files/module.prop
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ id=one-ui-features
name=OneUI_CSC_Features
author=Mzdyl
description=为 OneUI 添加更多优秀特性(Add more great features to OneUI)
updateJson=https://ghproxy.com/https://github.com/Mzdyl/OneUI_CSC_Features/blob/main/module.json
updateJson=https://raw.githubusercontent.com/Mzdyl/OneUI_CSC_Features/main/module.json

0 comments on commit caabd6e

Please sign in to comment.