mirror of
https://github.com/xweiba/location-spoofer.git
synced 2026-09-25 16:11:54 +08:00
72 lines
1.9 KiB
YAML
72 lines
1.9 KiB
YAML
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: Run contract tests
|
|
run: ./Tests/run_all_contract_tests.sh
|
|
|
|
- name: Build unsigned IPA
|
|
run: ./build.sh
|
|
|
|
- name: Rename IPA for release
|
|
run: mv dist/PaopaoLocationSpoofer-unsigned.ipa dist/Location-Spoofer-unsigned.ipa
|
|
|
|
- name: Validate archived release notes
|
|
run: |
|
|
VERSION="${{ github.ref_name }}"
|
|
for NOTES_FILE in \
|
|
"docs/releases/${VERSION}.en.md" \
|
|
"docs/releases/${VERSION}.md" \
|
|
"docs/releases/${VERSION}.zh-Hant.md"; do
|
|
if [ ! -s "$NOTES_FILE" ]; then
|
|
echo "::error::Missing localized release notes: $NOTES_FILE"
|
|
exit 1
|
|
fi
|
|
if ! grep -Fq "# ${VERSION}" "$NOTES_FILE"; then
|
|
echo "::error::$NOTES_FILE must contain the # ${VERSION} heading"
|
|
exit 1
|
|
fi
|
|
done
|
|
{
|
|
cat "docs/releases/${VERSION}.en.md"
|
|
printf '\n---\n\n'
|
|
cat "docs/releases/${VERSION}.md"
|
|
printf '\n---\n\n'
|
|
cat "docs/releases/${VERSION}.zh-Hant.md"
|
|
} > /tmp/release_notes.md
|
|
|
|
- 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 }}
|