Fix release workflow: use gh CLI to publish IPA

Replace softprops action with gh release create/upload so tags
auto-publish Pocket_Poster.ipa on GitHub Releases.
This commit is contained in:
Mak5er committed 2026-08-11 05:30:57 +03:00
1 parent dd3b90d629
commit b01dca5c43
1 file changed
+61 -54
+61 -54
View File
@@ -3,39 +3,34 @@ name: Release IPA
on:
push:
tags:
- 'v*'
- "v*"
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g. v3.2.2). Leave empty to use MARKETING_VERSION.'
description: "Optional tag override (e.g. v3.2.2)"
required: false
default: ''
type: string
default: ""
permissions:
contents: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
name: Build & publish release
name: Build and release IPA
runs-on: macos-15
timeout-minutes: 45
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Select Xcode
run: |
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
xcodebuild -version
- name: Resolve packages
- name: Resolve Swift packages
run: |
xcodebuild -project "Pocket Poster.xcodeproj" \
-scheme "Pocket Poster" \
@@ -46,7 +41,7 @@ jobs:
chmod +x ./ipabuild.sh
./ipabuild.sh
- name: Prepare release files
- name: Package release assets
id: meta
run: |
set -euo pipefail
@@ -57,56 +52,68 @@ jobs:
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ inputs.tag }}" ]; then
TAG="${{ inputs.tag }}"
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
elif [ "${GITHUB_REF_TYPE}" = "tag" ]; then
TAG="${GITHUB_REF_NAME}"
else
TAG="v${VERSION}"
fi
# ipabuild.sh emits Pocket_Poster.ipa (+ legacy name)
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"
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 "version=$VERSION"
echo "build=$BUILD"
echo "bundle_id=$BUNDLE_ID"
echo "tag=$TAG"
} >> "$GITHUB_OUTPUT"
cat > release_notes.md <<EOF
## Pocket Poster ${VERSION}
bad_query fork for **iOS 26 – 27.0b4**
- On-device PosterBoard hash (no PC / Nugget)
- Apply wallpapers via sandbox escape
- Reset Collections (descriptor wipe)
- Mond-style WebKit respring (works in LiveContainer)
**Bundle ID:** \`${BUNDLE_ID}\`
**Build:** ${BUILD}
Sideload with TrollStore / SideStore / LiveContainer.
---
Credits: [forcequitOS/bad_query](https://github.com/forcequitOS/bad_query) · original [leminlimez/Pocket-Poster](https://github.com/leminlimez/Pocket-Poster)
EOF
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 "Tag: $TAG Version: $VERSION"
echo "Publishing tag=${TAG} version=${VERSION}"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.meta.outputs.tag }}
name: Pocket Poster ${{ steps.meta.outputs.version }}
body_path: release_notes.md
draft: false
prerelease: false
generate_release_notes: true
files: |
build/Pocket_Poster.ipa
build/Pocket_Poster_${{ steps.meta.outputs.version }}.ipa
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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