forked from opa334/Dopamine
-
Notifications
You must be signed in to change notification settings - Fork 6
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
21 changed files
with
540 additions
and
67 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,43 +1,53 @@ | ||
name: "Dopamine: build and upload" | ||
name: build_Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
- 2.2 | ||
paths-ignore: | ||
- ".gitignore" | ||
pull_request: | ||
branches: | ||
- '*' | ||
- 2.2 | ||
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 | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
VERSION: '2.2.1' | ||
BUNDLEID: 'com.wwg135.Dopamine' | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-13 | ||
environment: Auto Build And Release | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4.1.7 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Procursus | ||
uses: dhinakg/procursus-action@main | ||
- name: Pre Procursus | ||
uses: wwg135/procursus-action@main | ||
with: | ||
packages: ldid findutils sed coreutils make | ||
packages: ldid findutils coreutils make sed | ||
|
||
- name: Install THEOS | ||
- name: Pre trustcache | ||
run: | | ||
set -x | ||
git clone https://github.com/CRKatri/trustcache | ||
cd trustcache | ||
gmake -j$(sysctl -n hw.physicalcpu) OPENSSL=1 | ||
sudo cp trustcache /opt/procursus/bin/ | ||
- name: Pre theos | ||
run: | | ||
set -x | ||
export BASEDIR="$(pwd)" | ||
|
@@ -52,45 +62,67 @@ jobs: | |
rm $THEOS/sdks/iPhoneOS16.5.sdk.tar | ||
cd $BASEDIR | ||
- name: Build and Install trustcache | ||
- name: Pre Bundleid | ||
run: | | ||
set -x | ||
git clone https://github.com/CRKatri/trustcache | ||
cd trustcache | ||
gmake -j$(sysctl -n hw.physicalcpu) OPENSSL=1 | ||
sudo cp trustcache /opt/procursus/bin/ | ||
sed -i '' "s/com.opa334.Dopamine/${{ env.BUNDLEID }}/g" ./Application/Dopamine/Jailbreak/DOPreferenceManager.m | ||
sed -i '' "s/com.opa334.Dopamine/${{ env.BUNDLEID }}/g" ./Application/Dopamine.xcodeproj/project.pbxproj | ||
sed -i '' "s/com.opa334.Dopamine/${{ env.BUNDLEID }}/g" ./BaseBin/jbctl/src/main.m | ||
- 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: Print env | ||
run: | | ||
echo ${{ env.VERSION }} | ||
echo ${{ env.msT }} | ||
echo ${{ env.shT }} | ||
echo ${{ env.logT }} | ||
- name: Pre Version | ||
run: | | ||
echo "${{ env.VERSION }}" >./BaseBin/_external/basebin/.version | ||
sed -i '' 's/MARKETING_VERSION = .*;/MARKETING_VERSION = ${{ env.VERSION }};/g' ./Application/Dopamine.xcodeproj/project.pbxproj | ||
sed -i '' "s/AAA/更新时间:${{ env.shT }} 由M哥编译/g" ./Application/Dopamine/UI/DOMainViewController.m | ||
- name: Install libarchive | ||
run: | | ||
brew install libarchive | ||
- name: Download Bootstraps | ||
run: | | ||
set -x | ||
cd Application/Dopamine/Resources | ||
./download_bootstraps.sh | ||
set -x | ||
cd Application/Dopamine/Resources | ||
./download_bootstraps.sh | ||
- name: Build | ||
- name: Build ipa | ||
run: | | ||
set -x | ||
export BASEDIR="$(pwd)" | ||
export THEOS="${BASEDIR}/theos" | ||
gmake -j$(sysctl -n hw.physicalcpu) NIGHTLY=1 | ||
mv Application/Dopamine.tipa Dopamine.ipa | ||
- name: Upload Artifact | ||
id: dopamine-latest-upload | ||
uses: actions/upload-artifact@v3 | ||
- name: Release Logs | ||
run: | | ||
set -x | ||
echo -e "更新时间:${{ env.logT }}" >> body.txt | ||
echo "" >> ./release.md | ||
cat body.txt > release.txt | ||
echo "" >> release.txt | ||
cat ./release.md >> release.txt | ||
- name: Release ipa | ||
uses: softprops/[email protected] | ||
with: | ||
name: Dopamine | ||
path: | | ||
${{ github.workspace }}/Application/Dopamine.ipa | ||
name: ${{ env.VERSION }} | ||
tag_name: ${{ env.VERSION }} | ||
target_commitish: 2.x | ||
body_path: release.txt | ||
latest: true | ||
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | ||
files: | | ||
*.ipa |
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
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
Binary file not shown.
Binary file not shown.
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
Oops, something went wrong.