Refactor iOS and macOS build steps in workflow #6
Workflow file for this run
This file contains hidden or 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 and Release | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # ----------- iOS 构建 ------------ | |
| - name: Build iOS .app | |
| run: | | |
| xcodebuild \ | |
| -project CCZUHelper.xcodeproj \ | |
| -scheme CCZUHelper \ | |
| -configuration Release \ | |
| -sdk iphoneos \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGN_IDENTITY="" \ | |
| build \ | |
| CONFIGURATION_BUILD_DIR=build/ios | |
| - name: Pack IPA manually | |
| run: | | |
| mkdir -p Payload | |
| cp -R build/ios/CCZUHelper.app Payload/ | |
| zip -r CCZUHelper-unsigned.ipa Payload | |
| rm -rf Payload | |
| # ----------- macOS 构建 ------------ | |
| - name: Build macOS .app | |
| run: | | |
| xcodebuild \ | |
| -project CCZUHelper.xcodeproj \ | |
| -scheme CCZUHelper \ | |
| -configuration Release \ | |
| -sdk macosx \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGN_IDENTITY="" \ | |
| build \ | |
| CONFIGURATION_BUILD_DIR=build/macos | |
| cp -R build/macos/CCZUHelper.app build/CCZUHelper-macOS.app | |
| # ----------- 上传结果 ------------ | |
| - name: Upload Release Assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| CCZUHelper-unsigned.ipa | |
| build/CCZUHelper-macOS.app | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |