-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
49 additions
and
41 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 |
---|---|---|
@@ -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: | | ||
|
@@ -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 }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
完善CSC的自动适配(BTU 测试通过) | ||
代码整理 | ||
移除对 多开 的支持 | ||
KSU支持? | ||
禁止锁帧 | ||
替换240HZ采样率实现 |
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 |
---|---|---|
@@ -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" | ||
} |
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