test #1464
Workflow file for this run
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
name: build_Release | |
on: | |
push: | |
branches: | |
- 1.0.5 | |
paths-ignore: | |
- ".gitignore" | |
workflow_dispatch: | |
env: | |
VERSION: '1.0.5' | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Procursus | |
uses: wwg135/procursus-action@main | |
with: | |
packages: ldid trustcache make findutils coreutils | |
- name: Install THEOS | |
run: | | |
curl -fsSL https://raw.githubusercontent.com/theos/theos/master/bin/install-theos > theos | |
sed -i '' 's/get_sdks$//g' theos | |
bash theos | |
- name: Set env | |
run: | | |
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: Print env | |
run: | | |
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/AAC/${{ env.msT }}/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 | |
- 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.0.5版本\n> - 2.新增:当有新本更新可用时,可选择安装非1.0.5版本。若点击立即更新,只更新当前的最新版本\n> - 3.设置新增【更换版本】开关,打开就可以安装非1.0.5版本的最新版本,也相当于切换非1.0.5版本后续仅接收非1.0.5版本OTA升级\n> - 4.其他显示优化修正" >> body.txt | |
- name: Build ipa | |
run: | | |
set -x | |
export THEOS=$HOME/theos | |
gmake -j$(sysctl -n hw.physicalcpu) | |
mv Dopamine/Dopamine.tipa Dopamine.ipa | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ env.VERSION }} | |
tag_name: ${{ env.msT }} | |
target_commitish: 1.0.5 | |
body_path: body.txt | |
prerelease: true | |
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
files: | | |
*.ipa |