From cc44c8c638bede962703a9ad83a39a8dd736f5dd Mon Sep 17 00:00:00 2001 From: WindowsMEMZ Date: Fri, 23 Feb 2024 21:09:12 +0800 Subject: [PATCH] ci: Added script for Xcode Cloud on Canary Deploy workflow --- DarockBili.xcodeproj/project.pbxproj | 10 ++++++++++ ci_scripts/ci_post_xcodebuild.sh | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100644 ci_scripts/ci_post_xcodebuild.sh diff --git a/DarockBili.xcodeproj/project.pbxproj b/DarockBili.xcodeproj/project.pbxproj index d9dde48c6..b6d81e19e 100644 --- a/DarockBili.xcodeproj/project.pbxproj +++ b/DarockBili.xcodeproj/project.pbxproj @@ -411,6 +411,7 @@ 8CA7CCD72B77B54F008E587F /* LivePlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LivePlayerView.swift; sourceTree = ""; }; 8CA7CCD92B77B55F008E587F /* LiveDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveDetailView.swift; sourceTree = ""; }; 8CA7CCDB2B77B571008E587F /* LiveMessagesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveMessagesView.swift; sourceTree = ""; }; + 8CB0D0232B88CEC40057EF1C /* ci_post_xcodebuild.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = ci_post_xcodebuild.sh; sourceTree = ""; }; 8CBFF1272B86188D00350E0F /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = ""; }; 8CC3D5572B7CA209005636DC /* UserDynamicListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDynamicListView.swift; sourceTree = ""; }; 8CC3D5592B7CB95D005636DC /* NowPlayingExtension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NowPlayingExtension.m; sourceTree = ""; }; @@ -746,6 +747,14 @@ path = Live; sourceTree = ""; }; + 8CB0D0222B88CE980057EF1C /* ci_scripts */ = { + isa = PBXGroup; + children = ( + 8CB0D0232B88CEC40057EF1C /* ci_post_xcodebuild.sh */, + ); + path = ci_scripts; + sourceTree = ""; + }; 8CC5B7412B8749BC00BAD89E /* MeowBiliUITests */ = { isa = PBXGroup; children = ( @@ -762,6 +771,7 @@ 8C72E32A2B6605B80087486E /* README.md */, 8CA388A02B78B5D800F5F91F /* BiliFont.ttf */, 8CBFF1272B86188D00350E0F /* .swiftlint.yml */, + 8CB0D0222B88CE980057EF1C /* ci_scripts */, B4468A142B4FC24A002CCEB2 /* JSONReturnExamples */, 8CA7CBC12B77AC4A008E587F /* MeowBili */, 8CC5B7412B8749BC00BAD89E /* MeowBiliUITests */, diff --git a/ci_scripts/ci_post_xcodebuild.sh b/ci_scripts/ci_post_xcodebuild.sh new file mode 100644 index 000000000..85a73f681 --- /dev/null +++ b/ci_scripts/ci_post_xcodebuild.sh @@ -0,0 +1,9 @@ +#!/bin/zsh +# ci_post_xcodebuild.sh + +if [[ "$CI_WORKFLOW" == "Canary Deploy" ]]; then + TESTFLIGHT_DIR_PATH=../TestFlight + mkdir $TESTFLIGHT_DIR_PATH + echo "CI 自动生成信息,24小时内的main分支diff:\n" > $TESTFLIGHT_DIR_PATH/WhatToTest.zh-CN.txt + git fetch && git log --since="24 hours ago" -p main >> $TESTFLIGHT_DIR_PATH/WhatToTest.zh-CN.txt +fi