Skip to content

Commit 81d57b1

Browse files
authored
Minor UI improvements and update workflow file
1 parent f10f1ba commit 81d57b1

File tree

3 files changed

+85
-19
lines changed

3 files changed

+85
-19
lines changed

.github/workflows/build-unsigned-ipa.yml

Lines changed: 80 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build ProStore iOS (Unsigned)
1+
name: ProStore iOS Build and Release
22

33
on:
44
workflow_dispatch:
@@ -17,7 +17,10 @@ jobs:
1717
build-unsigned-ipa:
1818
runs-on: macos-15
1919
timeout-minutes: 60
20-
20+
outputs:
21+
version: ${{ steps.get_version.outputs.version }}
22+
release_exists: ${{ steps.check_release.outputs.exists }}
23+
changelog: ${{ steps.generate_changelog.outputs.CHANGELOG }}
2124
steps:
2225
- name: Checkout repo (full history)
2326
uses: actions/checkout@v4
@@ -362,38 +365,102 @@ jobs:
362365
echo "EOF" >> $GITHUB_OUTPUT
363366
shell: bash
364367

368+
create-github-release:
369+
needs: build-unsigned-ipa
370+
if: needs.build-unsigned-ipa.outputs.release_exists == 'false'
371+
runs-on: ubuntu-latest
372+
steps:
373+
- name: Ensure gh exists (best-effort)
374+
run: |
375+
# gh (GitHub CLI)
376+
if ! command -v gh >/dev/null 2>&1; then
377+
echo "gh not found — attempting official installer script"
378+
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
379+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
380+
sudo apt update
381+
sudo apt install gh -y || true
382+
fi
383+
384+
echo "gh: $(gh --version 2>/dev/null || echo 'not installed')"
385+
386+
- name: Download device IPA artifact
387+
uses: actions/download-artifact@v4
388+
with:
389+
name: com.prostoreios.prostore-unsigned-ios.ipa
390+
path: build
391+
392+
- name: Download simulator IPA artifact (optional)
393+
uses: actions/download-artifact@v4
394+
continue-on-error: true
395+
with:
396+
name: com.prostoreios.prostore-unsigned-iossimulator.ipa
397+
path: build
398+
365399
- name: Create GitHub Release
366-
if: steps.check_release.outputs.exists == 'false'
367400
env:
368401
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
402+
VERSION: ${{ needs.build-unsigned-ipa.outputs.version }}
403+
CHANGELOG: ${{ needs.build-unsigned-ipa.outputs.changelog }}
369404
run: |
370-
VERSION="${{ steps.get_version.outputs.version }}"
371405
TAG="v$VERSION"
372-
CHANGELOG="${{ steps.generate_changelog.outputs.CHANGELOG }}"
373406
echo "Creating release $TAG with notes:"
374407
printf '%s\n' "$CHANGELOG"
408+
DEVICE_IPA="build/com.prostoreios.prostore-unsigned-ios.ipa"
409+
SIM_IPA="build/com.prostoreios.prostore-unsigned-iossimulator.ipa"
410+
SIM_ARG=""
411+
if [ -f "$SIM_IPA" ]; then
412+
SIM_ARG="$SIM_IPA"
413+
fi
375414
gh release create "$TAG" \
376-
build/com.prostoreios.prostore-unsigned-ios.ipa \
377-
build/com.prostoreios.prostore-unsigned-iossimulator.ipa \
415+
"$DEVICE_IPA" $SIM_ARG \
378416
--title "ProStore v$VERSION" \
379417
--notes "$CHANGELOG"
380418
shell: bash
381419

420+
create-app-source-json:
421+
needs: build-unsigned-ipa
422+
if: needs.build-unsigned-ipa.outputs.release_exists == 'false'
423+
runs-on: ubuntu-latest
424+
permissions:
425+
contents: write
426+
steps:
427+
- name: Checkout repo (full history)
428+
uses: actions/checkout@v4
429+
with:
430+
fetch-depth: 0
431+
persist-credentials: true
432+
433+
- name: Ensure jq exists (best-effort)
434+
run: |
435+
# jq
436+
if ! command -v jq >/dev/null 2>&1; then
437+
echo "jq not found — attempting to install"
438+
sudo apt update
439+
sudo apt install jq -y || true
440+
fi
441+
442+
echo "jq: $(jq --version 2>/dev/null || echo 'not installed')"
443+
444+
- name: Download device IPA artifact
445+
uses: actions/download-artifact@v4
446+
with:
447+
name: com.prostoreios.prostore-unsigned-ios.ipa
448+
path: build
449+
382450
- name: Update app-repo.json with latest ProStore version
383-
if: steps.check_release.outputs.exists == 'false'
384451
env:
385452
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
453+
VERSION: ${{ needs.build-unsigned-ipa.outputs.version }}
454+
CHANGELOG: ${{ needs.build-unsigned-ipa.outputs.changelog }}
386455
run: |
387456
set -e
388-
VERSION="${{ steps.get_version.outputs.version }}"
389457
IPA_PATH="$PWD/build/com.prostoreios.prostore-unsigned-ios.ipa"
390458
DOWNLOAD_URL="https://github.com/ProStore-iOS/ProStore/releases/download/v$VERSION/com.prostoreios.prostore-unsigned-ios.ipa"
391459
REPO_FILE="app-repo.json"
392-
CHANGELOG="${{ steps.generate_changelog.outputs.CHANGELOG }}"
393460
394461
if [ -f "$IPA_PATH" ]; then
395-
IPA_SIZE=$(stat -f%z "$IPA_PATH")
396-
SHA256=$(shasum -a 256 "$IPA_PATH" | awk '{print $1}')
462+
IPA_SIZE=$(stat -c%s "$IPA_PATH")
463+
SHA256=$(sha256sum "$IPA_PATH" | awk '{print $1}')
397464
else
398465
IPA_SIZE=0
399466
SHA256=""
@@ -502,12 +569,11 @@ jobs:
502569
shell: bash
503570

504571
- name: Push apps.json to Pages repo (ProStore-iOS.github.io) using PAT
505-
if: steps.check_release.outputs.exists == 'false'
506572
env:
507573
PAGES_PAT: ${{ secrets.PAGES_PAT }}
508574
run: |
509575
set -e
510-
VERSION="${{ steps.get_version.outputs.version }}"
576+
VERSION="${{ needs.build-unsigned-ipa.outputs.version }}"
511577
PAGES_REPO="ProStore-iOS/ProStore-iOS.github.io"
512578
PAGES_DIR=$(mktemp -d)
513579

Sources/prostore/views/SignerView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ struct SignerView: View {
3030
HStack {
3131
Text("IPA:")
3232
Spacer()
33-
Text(ipa.name.isEmpty ? "none" : ipa.name).foregroundColor(.secondary)
33+
Text(ipa.name.isEmpty ? "" : ipa.name).foregroundColor(.secondary)
3434
Button("Pick") { showPickerFor = .ipa }
3535
}
3636
HStack {
3737
Text("P12:")
3838
Spacer()
39-
Text(p12.name.isEmpty ? "none" : p12.name).foregroundColor(.secondary)
39+
Text(p12.name.isEmpty ? "" : p12.name).foregroundColor(.secondary)
4040
Button("Pick") { showPickerFor = .p12 }
4141
}
4242
HStack {
4343
Text("MobileProvision:")
4444
Spacer()
45-
Text(prov.name.isEmpty ? "none" : prov.name).foregroundColor(.secondary)
45+
Text(prov.name.isEmpty ? "" : prov.name).foregroundColor(.secondary)
4646
Button("Pick") { showPickerFor = .prov }
4747
}
4848
SecureField("P12 Password", text: $p12Password)

project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ targets:
3131
properties:
3232
CFBundleDisplayName: "ProStore"
3333
CFBundleName: "prostore"
34-
CFBundleVersion: "8"
35-
CFBundleShortVersionString: "1.1.2"
34+
CFBundleVersion: "9"
35+
CFBundleShortVersionString: "1.1.3"
3636
UILaunchStoryboardName: "LaunchScreen"
3737
NSPrincipalClass: "UIApplication"
3838
NSAppTransportSecurity:

0 commit comments

Comments
 (0)