name: Build and Release IPA on: push: tags: - 'v*' jobs: build: runs-on: macos-latest permissions: contents: write steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Xcode uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: latest-stable - name: Setup Go uses: actions/setup-go@v5 with: go-version: '1.23' - name: Install XcodeGen run: brew install xcodegen - name: Build unsigned IPA run: ./build.sh - name: Rename IPA for release run: mv dist/PaopaoLocationSpoofer-unsigned.ipa dist/Location-Spoofer-unsigned.ipa - name: Read release notes id: changelog run: | VERSION="${{ github.ref_name }}" NOTES_FILE="docs/releases/${VERSION}.md" if [ -f "$NOTES_FILE" ]; then cat "$NOTES_FILE" > /tmp/release_notes.md else echo "⚠️ $NOTES_FILE 未找到,请创建该文件。" > /tmp/release_notes.md fi { echo "notes<> $GITHUB_OUTPUT - name: Create Release uses: softprops/action-gh-release@v2 with: name: "${{ github.ref_name }}" body_path: /tmp/release_notes.md files: dist/Location-Spoofer-unsigned.ipa env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}