Replace softprops action with gh release create/upload so tags auto-publish Pocket_Poster.ipa on GitHub Releases.
120 lines
3.8 KiB
YAML
120 lines
3.8 KiB
YAML
name: Release IPA
|
||
|
||
on:
|
||
push:
|
||
tags:
|
||
- "v*"
|
||
workflow_dispatch:
|
||
inputs:
|
||
tag:
|
||
description: "Optional tag override (e.g. v3.2.2)"
|
||
required: false
|
||
type: string
|
||
default: ""
|
||
|
||
permissions:
|
||
contents: write
|
||
|
||
jobs:
|
||
release:
|
||
name: Build and release IPA
|
||
runs-on: macos-15
|
||
timeout-minutes: 60
|
||
|
||
steps:
|
||
- name: Checkout
|
||
uses: actions/checkout@v4
|
||
|
||
- name: Select Xcode
|
||
run: |
|
||
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
|
||
xcodebuild -version
|
||
|
||
- name: Resolve Swift packages
|
||
run: |
|
||
xcodebuild -project "Pocket Poster.xcodeproj" \
|
||
-scheme "Pocket Poster" \
|
||
-resolvePackageDependencies
|
||
|
||
- name: Build IPA
|
||
run: |
|
||
chmod +x ./ipabuild.sh
|
||
./ipabuild.sh
|
||
|
||
- name: Package release assets
|
||
id: meta
|
||
run: |
|
||
set -euo pipefail
|
||
APP_PLIST="build/DerivedDataApp/Build/Products/Release-iphoneos/Pocket Poster.app/Info.plist"
|
||
VERSION=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' "$APP_PLIST")
|
||
BUILD=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleVersion' "$APP_PLIST")
|
||
BUNDLE_ID=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' "$APP_PLIST")
|
||
|
||
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ inputs.tag }}" ]; then
|
||
TAG="${{ inputs.tag }}"
|
||
elif [ "${GITHUB_REF_TYPE}" = "tag" ]; then
|
||
TAG="${GITHUB_REF_NAME}"
|
||
else
|
||
TAG="v${VERSION}"
|
||
fi
|
||
|
||
test -f build/Pocket_Poster.ipa || cp "build/Pocket Poster.ipa" build/Pocket_Poster.ipa
|
||
cp build/Pocket_Poster.ipa "build/Pocket_Poster_${VERSION}.ipa"
|
||
|
||
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
||
echo "build=${BUILD}" >> "$GITHUB_OUTPUT"
|
||
echo "bundle_id=${BUNDLE_ID}" >> "$GITHUB_OUTPUT"
|
||
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
||
|
||
{
|
||
echo "## Pocket Poster ${VERSION}"
|
||
echo ""
|
||
echo "bad_query fork for **iOS 26 – 27.0b4**"
|
||
echo ""
|
||
echo "- On-device PosterBoard hash (no PC / Nugget)"
|
||
echo "- Apply wallpapers via sandbox escape"
|
||
echo "- Reset Collections (descriptor wipe)"
|
||
echo "- Mond-style WebKit respring (works in LiveContainer)"
|
||
echo ""
|
||
echo "**Bundle ID:** \`${BUNDLE_ID}\`"
|
||
echo "**Build:** ${BUILD}"
|
||
echo ""
|
||
echo "Sideload with TrollStore / SideStore / LiveContainer."
|
||
echo ""
|
||
echo "---"
|
||
echo "Credits: forcequitOS/bad_query · original leminlimez/Pocket-Poster"
|
||
} > release_notes.md
|
||
|
||
ls -lh build/*.ipa
|
||
echo "Publishing tag=${TAG} version=${VERSION}"
|
||
|
||
- name: Create GitHub Release
|
||
env:
|
||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
run: |
|
||
set -euo pipefail
|
||
TAG="${{ steps.meta.outputs.tag }}"
|
||
VERSION="${{ steps.meta.outputs.version }}"
|
||
|
||
# Create tag on current commit if dispatch without existing tag
|
||
if ! git rev-parse "$TAG" >/dev/null 2>&1; then
|
||
git tag "$TAG"
|
||
git push origin "$TAG" || true
|
||
fi
|
||
|
||
if gh release view "$TAG" >/dev/null 2>&1; then
|
||
gh release upload "$TAG" \
|
||
build/Pocket_Poster.ipa \
|
||
"build/Pocket_Poster_${VERSION}.ipa" \
|
||
--clobber
|
||
gh release edit "$TAG" \
|
||
--title "Pocket Poster ${VERSION}" \
|
||
--notes-file release_notes.md
|
||
else
|
||
gh release create "$TAG" \
|
||
build/Pocket_Poster.ipa \
|
||
"build/Pocket_Poster_${VERSION}.ipa" \
|
||
--title "Pocket Poster ${VERSION}" \
|
||
--notes-file release_notes.md
|
||
fi
|