Repository navigation
56 lines (48 loc) · 1.58 KB
/
Copy pathrelease.yml
File metadata and controls
56 lines (48 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Release unsigned IPA
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
runs-on: macos-15
steps:
- uses: actions/checkout@v5
- name: Build unsigned IPA
run: |
set -euo pipefail
xcodebuild -project AFUScale.xcodeproj \
-scheme AFUScale \
-configuration Release \
-destination 'generic/platform=iOS' \
-derivedDataPath build \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY="" \
build
app=build/Build/Products/Release-iphoneos/AFUScale.app
if codesign -dv "$app" 2>/dev/null; then
echo "::error::AFUScale.app was unexpectedly signed"
exit 1
fi
payload=build/Build/Products/Release-iphoneos/Payload
rm -rf "$payload"
mkdir -p "$payload"
cp -R "$app" "$payload/"
ipa="build/AFUScale-${GITHUB_REF_NAME}-unsigned.ipa"
(cd "$(dirname "$payload")" && zip -qry "$OLDPWD/$ipa" Payload)
unzip -l "$ipa" | grep -q 'Payload/AFUScale.app/Info.plist'
echo "IPA=$ipa" >> "$GITHUB_ENV"
- name: Publish GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then
gh release upload "$GITHUB_REF_NAME" "$IPA" --clobber
else
gh release create "$GITHUB_REF_NAME" "$IPA" \
--title "$GITHUB_REF_NAME" \
--generate-notes
fi