Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wwg135 authored Aug 3, 2023
1 parent 7573932 commit b736663
Showing 1 changed file with 62 additions and 56 deletions.
118 changes: 62 additions & 56 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
name: "Dopamine: build and upload"

name: build_Release
on:
push:
branches:
- master
paths-ignore:
- ".gitignore"
pull_request:
branches:
- master
- 1.1.3
paths-ignore:
- ".gitignore"
workflow_dispatch:
schedule:
- cron: '0 0 1 1 *'
- cron: '0 0 1 4 *'
- cron: '0 0 30 6 *'
- cron: '0 0 28 9 *'
- cron: '0 0 27 12 *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
VERSION: '1.1.3'

jobs:
build:
runs-on: macos-latest
Expand All @@ -31,52 +18,71 @@ jobs:
uses: actions/checkout@v3

- name: Install Procursus
uses: dhinakg/procursus-action@main
uses: wwg135/procursus-action@main
with:
packages: ldid findutils sed coreutils trustcache make
packages: ldid trustcache make findutils coreutils

- name: Install THEOS (without SDKs)
- name: Install THEOS
run: |
set -x
export BASEDIR="$(pwd)"
export THEOS="${BASEDIR}/theos"
mkdir -p $THEOS
curl -fsSL https://raw.githubusercontent.com/theos/theos/master/bin/install-theos >> install-theos.sh
gsed -E "/^\s*get_theos\s*$/,+1 s/^(\s*)(get_sdks)\s*$/\1mkdir -p \${THEOS}\/sdks\n\1touch \${THEOS}\/sdks\/sdk\n\1\2/g" -i install-theos.sh
bash install-theos.sh
cd $BASEDIR
curl -fsSL https://raw.githubusercontent.com/theos/theos/master/bin/install-theos > theos
sed -i '' 's/get_sdks$//g' theos
bash theos
- name: Set Environment Variables
- name: Set env
run: |
set -x
T2=$(TZ=UTC-2 date +'%Y%m%d_%H%M%S')
TS=$(date -j -f "%Y%m%d_%H%M%S" "${T2}" +%s)
SHASH=$(git rev-parse --short HEAD)
echo "ctime=${T2}" >> $GITHUB_ENV
echo "ctimestamp=${TS}" >> $GITHUB_ENV
echo "shorthash=${SHASH}" >> $GITHUB_ENV
sT=$(TZ=UTC-8 date +'%S')
echo "msT=$(date -j -f "%Y-%m-%d %H:%M:%S" "$(TZ=UTC-8 date +'%Y-%m-%d %H:%M'):${sT}" +%s)" >> $GITHUB_ENV
echo "shT=$(TZ=UTC-8 date +'%Y-%m-%d'' ''%H:%M:%S')" >> $GITHUB_ENV
echo "logT=$(TZ=UTC-8 date +'%Y年%m月%d %H:%M'):${sT}" >> $GITHUB_ENV
- name: Build
- name: Print env
run: |
set -x
echo ${{ env.VERSION }}
echo ${{ env.msT }}
echo ${{ env.shT }}
echo ${{ env.logT }}
- name: Pre code and keychain
run: |
sed -i '' "s/AAA/更新时间/g" ./Dopamine/Dopamine/UI/Views/JailbreakView.swift
sed -i '' "s/AAB/${{ env.shT }}/g" ./Dopamine/Dopamine/UI/Views/JailbreakView.swift
sed -i '' 's/MARKETING_VERSION = .*;/MARKETING_VERSION = ${{ env.VERSION }};/g' ./Dopamine/Dopamine.xcodeproj/project.pbxproj
sudo security import Exploits/fastPath/arm.pfx -k /Library/Keychains/System.keychain -P password -A
export BASEDIR="$(pwd)"
export THEOS="${BASEDIR}/theos"
- name: Pre body
run: |
echo -e "[点击当前版本下载](https://github.com/wwg135/Dopamine/releases/download/${{ env.msT }}/Dopamine.ipa)" >> body.txt
echo -e "\n更新时间:${{ env.logT }}" >> body.txt
echo -e "\n**当前更新日志如下:**" >> body.txt
echo -e "\n> - 同步官方1.1.3正式版更新" >> body.txt
echo -e "\n1.1的修改版功能如下:" >> body.txt
echo -e "**注意:追求稳定,此版本无【桥接心浪】、【映射挂载】功能**" >> body.txt
echo -e "> - 1、新增【检查更新】功能,设置里面打开即可检查更新,默认关闭!!!" >> body.txt
echo -e "> - 2、新增初次越狱/重建越狱时,默认安装 【ElleKit_1.0】 、 【PreferenceLoader_2.2.6.1】、【Xinamine】。感谢liam0205大佬的代码!!!" >> body.txt
echo -e "> - 3、首页新增【系统运行时间】----越狱后显示,打开多巴胺即弹出!!!" >> body.txt
echo -e "> - 4、长按【重启用户空间】3Dtouch弹出的【重启】功能才是真正重启手机(此操作重启后处于非越狱状态,谨慎操作)。7/8新增弹出【更新越狱环境】,仅针对从trollstore更新安装dopamine有用,覆盖安装更新建议执行该操作,感谢liam0205大佬的代码!!!" >> body.txt
echo -e "> - 6、新增【自定义dopamine首页背景】--将图片命名为:Wallpaper.jpg放置在目录:/var/mobile/。感谢真皮大佬的代码!!!" >> body.txt
echo -e "> - 7、设置新增【清除越狱】确认。若处于越狱状态,提示确认重启设备后再清除操作,否则不允许清除越狱!!!" >> body.txt
echo -e "> - 8、新增越狱后默认配置底层屏蔽文件【zp.unject.plist】,路径为:/var/mobile/,可自定义app屏蔽越狱检测!!!" >> body.txt
echo -e "> - 9、新增一键启用【自定义app屏蔽越狱检测】(开关在越狱后设置里面)!!!" >> body.txt
echo -e "> - 10、新增【添加/删除App屏蔽】功能,功能和说明在设置里面!!!" >> body.txt
echo -e "> - 11、其他设置UI、显示细节优化。。。" >> body.txt
- name: Build ipa
run: |
set -x
export THEOS=$HOME/theos
gmake -j$(sysctl -n hw.physicalcpu)
cp -a Dopamine/Dopamine.tipa Dopamine/Dopamine_${{ env.shorthash }}_${{ env.ctime }}.tipa
cp -a Dopamine/Dopamine.tipa Dopamine/Dopamine_Latest.tipa
mv Dopamine/Dopamine.tipa Dopamine.ipa
- name: Upload Latest Artifact
id: dopamine-latest-upload
uses: actions/upload-artifact@v3
with:
name: Dopamine_Latest
path: |
${{ github.workspace }}/Dopamine/Dopamine_Latest.tipa
- name: Upload Hashed Artifact
id: dopamine-hashed-upload
uses: actions/upload-artifact@v3
- name: Release
uses: softprops/action-gh-release@v1
with:
name: Dopamine_${{ env.shorthash }}_${{ env.ctime }}
path: |
${{ github.workspace }}/Dopamine/Dopamine_${{ env.shorthash }}_${{ env.ctime }}.tipa
name: ${{ env.VERSION }}
tag_name: ${{ env.msT }}
target_commitish: 1.1.3
body_path: body.txt
prerelease: true
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
files: |
*.ipa

0 comments on commit b736663

Please sign in to comment.