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:
1 parent
dd3b90d629
commit
b01dca5c43
1 file changed
+61
-54
@@ -3,39 +3,34 @@ name: Release IPA
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- "v*"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
tag:
|
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
|
required: false
|
||||||
default: ''
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: release-${{ github.ref }}
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Build & publish release
|
name: Build and release IPA
|
||||||
runs-on: macos-15
|
runs-on: macos-15
|
||||||
timeout-minutes: 45
|
timeout-minutes: 60
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Select Xcode
|
- name: Select Xcode
|
||||||
run: |
|
run: |
|
||||||
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
|
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
|
||||||
xcodebuild -version
|
xcodebuild -version
|
||||||
|
|
||||||
- name: Resolve packages
|
- name: Resolve Swift packages
|
||||||
run: |
|
run: |
|
||||||
xcodebuild -project "Pocket Poster.xcodeproj" \
|
xcodebuild -project "Pocket Poster.xcodeproj" \
|
||||||
-scheme "Pocket Poster" \
|
-scheme "Pocket Poster" \
|
||||||
@@ -46,7 +41,7 @@ jobs:
|
|||||||
chmod +x ./ipabuild.sh
|
chmod +x ./ipabuild.sh
|
||||||
./ipabuild.sh
|
./ipabuild.sh
|
||||||
|
|
||||||
- name: Prepare release files
|
- name: Package release assets
|
||||||
id: meta
|
id: meta
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -57,56 +52,68 @@ jobs:
|
|||||||
|
|
||||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ inputs.tag }}" ]; then
|
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ inputs.tag }}" ]; then
|
||||||
TAG="${{ inputs.tag }}"
|
TAG="${{ inputs.tag }}"
|
||||||
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
elif [ "${GITHUB_REF_TYPE}" = "tag" ]; then
|
||||||
TAG="${GITHUB_REF_NAME}"
|
TAG="${GITHUB_REF_NAME}"
|
||||||
else
|
else
|
||||||
TAG="v${VERSION}"
|
TAG="v${VERSION}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ipabuild.sh emits Pocket_Poster.ipa (+ legacy name)
|
test -f build/Pocket_Poster.ipa || cp "build/Pocket Poster.ipa" build/Pocket_Poster.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"
|
||||||
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 "## Pocket Poster ${VERSION}"
|
||||||
echo "build=$BUILD"
|
echo ""
|
||||||
echo "bundle_id=$BUNDLE_ID"
|
echo "bad_query fork for **iOS 26 – 27.0b4**"
|
||||||
echo "tag=$TAG"
|
echo ""
|
||||||
} >> "$GITHUB_OUTPUT"
|
echo "- On-device PosterBoard hash (no PC / Nugget)"
|
||||||
|
echo "- Apply wallpapers via sandbox escape"
|
||||||
cat > release_notes.md <<EOF
|
echo "- Reset Collections (descriptor wipe)"
|
||||||
## Pocket Poster ${VERSION}
|
echo "- Mond-style WebKit respring (works in LiveContainer)"
|
||||||
|
echo ""
|
||||||
bad_query fork for **iOS 26 – 27.0b4**
|
echo "**Bundle ID:** \`${BUNDLE_ID}\`"
|
||||||
|
echo "**Build:** ${BUILD}"
|
||||||
- On-device PosterBoard hash (no PC / Nugget)
|
echo ""
|
||||||
- Apply wallpapers via sandbox escape
|
echo "Sideload with TrollStore / SideStore / LiveContainer."
|
||||||
- Reset Collections (descriptor wipe)
|
echo ""
|
||||||
- Mond-style WebKit respring (works in LiveContainer)
|
echo "---"
|
||||||
|
echo "Credits: forcequitOS/bad_query · original leminlimez/Pocket-Poster"
|
||||||
**Bundle ID:** \`${BUNDLE_ID}\`
|
} > release_notes.md
|
||||||
**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
|
|
||||||
|
|
||||||
ls -lh build/*.ipa
|
ls -lh build/*.ipa
|
||||||
echo "Tag: $TAG Version: $VERSION"
|
echo "Publishing tag=${TAG} version=${VERSION}"
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- 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:
|
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
|
||||||
Reference in new issue
Block a user