From 448a312e1e304eea406f31894ac3b7f83698a4cb Mon Sep 17 00:00:00 2001 From: JGZ_YES Date: Tue, 11 Aug 2026 21:17:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20GitHub=20Actions=20?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=89=93=E5=8C=85=20IPA=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 110 ++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c8c794d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,110 @@ +name: Build iOS IPA + +on: + push: + branches: [main] + workflow_dispatch: + inputs: + configuration: + description: 'Build configuration' + required: true + default: 'debug' + type: choice + options: ['debug', 'release'] + +jobs: + build: + name: Build IPA + runs-on: macos-14 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set Xcode version + run: sudo xcode-select -s /Applications/Xcode_15.4.app + + - name: Show Xcode version + run: xcodebuild -version + + - name: Show build settings + run: | + xcodebuild -project AreYouSleeping.xcodeproj \ + -scheme AreYouSleeping \ + -showBuildSettings \ + -destination 'generic/platform=iOS' + + - name: Set build number + run: | + BUILD_NUM=${{ github.run_number }} + /usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${BUILD_NUM}" AreYouSleeping/Info.plist + + - name: Build archive + run: | + xcodebuild archive \ + -project AreYouSleeping.xcodeproj \ + -scheme AreYouSleeping \ + -configuration Release \ + -destination 'generic/platform=iOS' \ + -archivePath build/AreYouSleeping.xcarchive \ + CODE_SIGNING_ALLOWED=NO \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGN_IDENTITY="" | xcpretty + + - name: Package IPA + run: | + mkdir -p build/Payload + cp -R build/AreYouSleeping.xcarchive/Products/Applications/AreYouSleeping.app build/Payload/ + cd build + zip -r AreYouSleeping.ipa Payload + cd .. + + - name: Upload IPA artifact + uses: actions/upload-artifact@v4 + with: + name: AreYouSleeping-${{ github.run_number }}.ipa + path: build/AreYouSleeping.ipa + retention-days: 30 + + - name: Generate install manifest + run: | + cat > build/manifest.plist << 'PLIST' + + + + + items + + + assets + + + kind + software-package + url + __IPA_URL__ + + + metadata + + bundle-identifier + com.ausleep.ios + bundle-version + ${{ github.run_number }} + kind + software + title + 睡了吗 + + + + + + PLIST + + - name: Upload manifest + uses: actions/upload-artifact@v4 + with: + name: OTA-manifest + path: build/manifest.plist + retention-days: 30