Skip to content

Dopamine: build and upload #1338

Dopamine: build and upload

Dopamine: build and upload #1338

Workflow file for this run

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.修正ota升级逻辑,后续1.0.5版本仅收到1.0.5版本的ota升级\n> - 3.必须到仓库手动下载回来安装当前版本,后续才可以接收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