Repository navigation
126 lines (109 loc) · 4 KB
/
Copy pathrelease-ipa.yml
File metadata and controls
126 lines (109 loc) · 4 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Release IPA
# Builds an unsigned IPA whenever a GitHub release is published and attaches it
# as a release asset:
#
# PulseLoop-<tag>.ipa — full build (includes Live Activity extension)
#
# Unsigned. Sign locally with Sideloadly (free Apple ID, 7-day re-sign),
# ipasign.cc, or Feather with a distribution certificate.
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'Release tag to attach IPA to (e.g. beta, v1.0.0)'
required: true
permissions:
contents: read
# Don't let two runs for the same tag race the upload.
concurrency:
group: release-ipa-${{ github.event.inputs.tag || github.event.release.tag_name }}
cancel-in-progress: true
jobs:
build-ipa:
name: Build unsigned IPA
runs-on: macos-15
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
# Check out the code AT the release tag, not the default branch. On a
# `release: published` run github.ref is already refs/tags/<tag>; on a
# manual `workflow_dispatch` run we must use the supplied tag or we'd
# build main HEAD instead of the released source.
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
ref: ${{ github.event.inputs.tag || github.ref }}
- name: Select Xcode 26.3
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
with:
# Matches the toolchain used by the passing CI build.
xcode-version: '26.3'
- name: Show toolchain
run: xcodebuild -version
- name: Archive (unsigned, device slice)
run: |
xcodebuild archive \
-project PulseLoop.xcodeproj \
-scheme PulseLoop \
-configuration Release \
-sdk iphoneos \
-destination 'generic/platform=iOS' \
-archivePath build/PulseLoop.xcarchive \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO \
ONLY_ACTIVE_ARCH=NO
- name: Resolve tag
id: tag
env:
TAG_VALUE: ${{ github.event.inputs.tag || github.event.release.tag_name }}
run: |
TAG="$TAG_VALUE"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
# Git refs may contain slashes and other characters that cannot be
# used safely in a single filename. Keep TAG unchanged for GitHub,
# but normalize the IPA asset name.
SAFE_TAG="$(printf '%s' "$TAG" | sed -E 's/[^A-Za-z0-9._-]+/-/g; s/^-+//; s/-+$//')"
if [ -z "$SAFE_TAG" ]; then
SAFE_TAG="release"
fi
echo "safe_tag=$SAFE_TAG" >> "$GITHUB_OUTPUT"
- name: Package full IPA (includes Live Activity extension)
run: |
APP="build/PulseLoop.xcarchive/Products/Applications/PulseLoop.app"
if [ ! -d "$APP" ]; then
echo "::error::Archive did not produce $APP — build failed silently."
exit 1
fi
mkdir -p build/Payload
cp -r "$APP" build/Payload/
cd build && zip -r "PulseLoop-${{ steps.tag.outputs.safe_tag }}.ipa" Payload
- name: Stage IPA for release job
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: unsigned-ipa
path: build/*.ipa
if-no-files-found: error
upload-ipa:
name: Attach IPA to release
needs: build-ipa
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download packaged IPA
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
name: unsigned-ipa
path: build
- name: Attach IPA to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ needs.build-ipa.outputs.tag }}
run: |
gh release upload "$RELEASE_TAG" \
build/*.ipa \
--repo "$GITHUB_REPOSITORY" \
--clobber