Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit 0663fe8

Browse files
authored
Update
1 parent b5ae09a commit 0663fe8

4 files changed

Lines changed: 456 additions & 171 deletions

File tree

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

Lines changed: 164 additions & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: ProStore iOS Build and Release
22

33
on:
44
workflow_dispatch:
5-
# push:
6-
# branches: [ main ]
7-
# paths-ignore:
8-
# - 'README.md'
9-
# - 'gallery/**'
10-
# - 'website/**'
11-
# - '.github/**'
5+
push:
6+
branches: [ main ]
7+
paths-ignore:
8+
- 'README.md'
9+
- 'gallery/**'
10+
- 'website/**'
11+
- '.github/**'
1212

1313
permissions:
1414
contents: write
@@ -346,160 +346,160 @@ jobs:
346346
echo "EOF" >> $GITHUB_OUTPUT
347347
shell: bash
348348

349-
create-github-release:
350-
name: Create GitHub Release
351-
needs: build-unsigned-ipa
352-
if: needs.build-unsigned-ipa.outputs.release_exists == 'false'
353-
runs-on: ubuntu-latest
354-
steps:
355-
- name: Install GitHub CLI
356-
run: |
357-
# gh (GitHub CLI)
358-
if ! command -v gh >/dev/null 2>&1; then
359-
echo "gh not found — attempting official installer script"
360-
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
361-
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
362-
sudo apt update
363-
sudo apt install gh -y || true
364-
fi
365-
366-
echo "gh: $(gh --version 2>/dev/null || echo 'not installed')"
367-
368-
- name: Download Device IPA
369-
uses: actions/download-artifact@v4
370-
with:
371-
name: com.prostoreios.prostore-unsigned-ios.ipa
372-
path: build
373-
374-
- name: Create Release
375-
env:
376-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
377-
VERSION: ${{ needs.build-unsigned-ipa.outputs.version }}
378-
CHANGELOG: ${{ needs.build-unsigned-ipa.outputs.changelog }}
379-
run: |
380-
TAG="v$VERSION"
381-
echo "Creating release $TAG with notes:"
382-
printf '%s\n' "$CHANGELOG"
383-
DEVICE_IPA="build/com.prostoreios.prostore-unsigned-ios.ipa"
384-
gh release create "$TAG" \
385-
"$DEVICE_IPA" \
386-
--title "ProStore v$VERSION" \
387-
--notes "$CHANGELOG" \
388-
--repo "$GITHUB_REPOSITORY"
389-
shell: bash
390-
391-
update-prostore-repo-json:
392-
name: Update ProStore Repo JSON
393-
needs: build-unsigned-ipa
394-
if: needs.build-unsigned-ipa.outputs.release_exists == 'false'
395-
runs-on: ubuntu-latest
396-
env:
397-
VERSION: ${{ needs.build-unsigned-ipa.outputs.version }}
398-
CHANGELOG: ${{ needs.build-unsigned-ipa.outputs.changelog }}
399-
steps:
400-
- name: Install jq
401-
run: |
402-
# jq
403-
if ! command -v jq >/dev/null 2>&1; then
404-
echo "jq not found — attempting to install"
405-
sudo apt update
406-
sudo apt install jq -y || true
407-
fi
408-
409-
echo "jq: $(jq --version 2>/dev/null || echo 'not installed')"
410-
411-
- name: Download Device IPA
412-
uses: actions/download-artifact@v4
413-
with:
414-
name: com.prostoreios.prostore-unsigned-ios.ipa
415-
path: build
416-
417-
- name: Update Apps JSON in Pages Repo
418-
env:
419-
PAGES_PAT: ${{ secrets.PAGES_PAT }}
420-
run: |
421-
set -e
422-
IPA_PATH="$PWD/build/com.prostoreios.prostore-unsigned-ios.ipa"
423-
DOWNLOAD_URL="https://github.com/ProStore-iOS/ProStore/releases/download/v$VERSION/com.prostoreios.prostore-unsigned-ios.ipa"
424-
425-
if [ -f "$IPA_PATH" ]; then
426-
IPA_SIZE=$(stat -c%s "$IPA_PATH")
427-
SHA256=$(sha256sum "$IPA_PATH" | awk '{print $1}')
428-
else
429-
IPA_SIZE=0
430-
SHA256=""
431-
fi
432-
433-
VERSION_DATE_ISO=$(date -u +"%Y-%m-%dT%H:%M:%S%z")
434-
MIN_OS="16.0"
435-
FULL_DATE=$(date +%Y%m%d%H%M%S)
436-
437-
ICON_URL="https://raw.githubusercontent.com/ProStore-iOS/ProStore-iOS.github.io/refs/heads/main/ProStore_icon.png"
438-
BUNDLE="com.prostoreios.prostore"
439-
META_DESC="The BEST alternative app store for iOS!"
440-
DEVNAME="ProStore iOS"
441-
SCREENSHOTS='["https://raw.githubusercontent.com/ProStore-iOS/ProStore/refs/heads/main/gallery/Screenshot1.png","https://raw.githubusercontent.com/ProStore-iOS/ProStore/refs/heads/main/gallery/Screenshot2.png","https://raw.githubusercontent.com/ProStore-iOS/ProStore/refs/heads/main/gallery/Screenshot3.png","https://raw.githubusercontent.com/ProStore-iOS/ProStore/refs/heads/main/gallery/Screenshot4.png","https://raw.githubusercontent.com/ProStore-iOS/ProStore/refs/heads/main/gallery/Screenshot5.png"]'
442-
443-
PAGES_REPO="ProStore-iOS/ProStore-iOS.github.io"
444-
PAGES_DIR=$(mktemp -d)
445-
446-
echo "Cloning pages repo (masked token)..."
447-
git clone --depth 1 "https://x-access-token:${PAGES_PAT}@github.com/${PAGES_REPO}.git" "$PAGES_DIR"
448-
449-
cd "$PAGES_DIR"
450-
REPO_FILE="apps.json"
451-
452-
# Create base repo JSON if missing (first run only)
453-
if [ ! -f "$REPO_FILE" ]; then
454-
jq -n --arg icon "$ICON_URL" '{
455-
name: "Official ProStore Repo",
456-
identifier: "com.prostoreios.prostore.repo",
457-
sourceURL: "https://ProStore-iOS.github.io/apps.json",
458-
iconURL: $icon,
459-
website: "https://ProStore-iOS.github.io",
460-
subtitle: "The BEST alternative app store for iOS!",
461-
apps: []
462-
}' > "$REPO_FILE"
463-
fi
464-
465-
TMP=$(mktemp)
466-
467-
# Build the JSON representation of the new version (on one line to avoid parser issues)
468-
NEW_VERSION=$(jq -c -n \
469-
--arg version "$VERSION" \
470-
--arg date "$VERSION_DATE_ISO" \
471-
--arg desc "$CHANGELOG" \
472-
--arg url "$DOWNLOAD_URL" \
473-
--arg sha "$SHA256" \
474-
--arg minos "$MIN_OS" \
475-
--arg fulldate "$FULL_DATE" \
476-
--argjson size "$IPA_SIZE" \
477-
'{version: $version, date: $date, localizedDescription: $desc, downloadURL: $url, size: $size, sha256: $sha, minOSVersion: $minos, fullDate: $fulldate}')
478-
479-
# Single-line jq filter (YAML-friendly, with .apps //= [] for robustness)
480-
JQ_QUERY='(.apps //= []) | if ( .apps | map(.bundleIdentifier // .bundleID) | index($bundle) ) then .apps |= map( if ((.bundleIdentifier // .bundleID) == $bundle) then ( { "name": $name, "bundleIdentifier": $bundle, "developerName": $dev, "localizedDescription": $appdesc, "iconURL": $icon, "screenshotURLs": $screenshots } + { "versions": ( [ $newVer ] + ( .versions // [] ) ) } ) else . end ) else .apps += [ { "name": $name, "bundleIdentifier": $bundle, "developerName": $dev, "localizedDescription": $appdesc, "iconURL": $icon, "screenshotURLs": $screenshots, "versions": [ $newVer ] } ] end'
481-
482-
# Update or create the app entry (pass screenshots as argjson directly)
483-
jq --argjson newVer "$NEW_VERSION" \
484-
--arg name "ProStore" \
485-
--arg bundle "$BUNDLE" \
486-
--arg dev "$DEVNAME" \
487-
--arg appdesc "$META_DESC" \
488-
--arg icon "$ICON_URL" \
489-
--argjson screenshots "$SCREENSHOTS" \
490-
"$JQ_QUERY" "$REPO_FILE" > "$TMP" && mv "$TMP" "$REPO_FILE"
491-
492-
git config user.name "github-actions[bot]"
493-
git config user.email "github-actions[bot]@users.noreply.github.com"
494-
495-
# Only commit if there's a change
496-
git add "$REPO_FILE"
497-
if git diff --quiet --cached; then
498-
echo "No changes to apps.json — nothing to commit/push."
499-
exit 0
500-
fi
501-
502-
git commit -m "Update apps.json for ProStore v${VERSION}"
503-
echo "Pushing apps.json to ${PAGES_REPO}:main"
504-
git push "https://x-access-token:${PAGES_PAT}@github.com/${PAGES_REPO}.git" HEAD:main
505-
shell: bash
349+
# create-github-release:
350+
# name: Create GitHub Release
351+
# needs: build-unsigned-ipa
352+
# if: needs.build-unsigned-ipa.outputs.release_exists == 'false'
353+
# runs-on: ubuntu-latest
354+
# steps:
355+
# - name: Install GitHub CLI
356+
# run: |
357+
# # gh (GitHub CLI)
358+
# if ! command -v gh >/dev/null 2>&1; then
359+
# echo "gh not found — attempting official installer script"
360+
# curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
361+
# 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
362+
# sudo apt update
363+
# sudo apt install gh -y || true
364+
# fi
365+
#
366+
# echo "gh: $(gh --version 2>/dev/null || echo 'not installed')"
367+
#
368+
# - name: Download Device IPA
369+
# uses: actions/download-artifact@v4
370+
# with:
371+
# name: com.prostoreios.prostore-unsigned-ios.ipa
372+
# path: build
373+
#
374+
# - name: Create Release
375+
# env:
376+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
377+
# VERSION: ${{ needs.build-unsigned-ipa.outputs.version }}
378+
# CHANGELOG: ${{ needs.build-unsigned-ipa.outputs.changelog }}
379+
# run: |
380+
# TAG="v$VERSION"
381+
# echo "Creating release $TAG with notes:"
382+
# printf '%s\n' "$CHANGELOG"
383+
# DEVICE_IPA="build/com.prostoreios.prostore-unsigned-ios.ipa"
384+
# gh release create "$TAG" \
385+
# "$DEVICE_IPA" \
386+
# --title "ProStore v$VERSION" \
387+
# --notes "$CHANGELOG" \
388+
# --repo "$GITHUB_REPOSITORY"
389+
# shell: bash
390+
#
391+
# update-prostore-repo-json:
392+
# name: Update ProStore Repo JSON
393+
# needs: build-unsigned-ipa
394+
# if: needs.build-unsigned-ipa.outputs.release_exists == 'false'
395+
# runs-on: ubuntu-latest
396+
# env:
397+
# VERSION: ${{ needs.build-unsigned-ipa.outputs.version }}
398+
# CHANGELOG: ${{ needs.build-unsigned-ipa.outputs.changelog }}
399+
# steps:
400+
# - name: Install jq
401+
# run: |
402+
# # jq
403+
# if ! command -v jq >/dev/null 2>&1; then
404+
# echo "jq not found — attempting to install"
405+
# sudo apt update
406+
# sudo apt install jq -y || true
407+
# fi
408+
#
409+
# echo "jq: $(jq --version 2>/dev/null || echo 'not installed')"
410+
#
411+
# - name: Download Device IPA
412+
# uses: actions/download-artifact@v4
413+
# with:
414+
# name: com.prostoreios.prostore-unsigned-ios.ipa
415+
# path: build
416+
#
417+
# - name: Update Apps JSON in Pages Repo
418+
# env:
419+
# PAGES_PAT: ${{ secrets.PAGES_PAT }}
420+
# run: |
421+
# set -e
422+
# IPA_PATH="$PWD/build/com.prostoreios.prostore-unsigned-ios.ipa"
423+
# DOWNLOAD_URL="https://github.com/ProStore-iOS/ProStore/releases/download/v$VERSION/com.prostoreios.prostore-unsigned-ios.ipa"
424+
#
425+
# if [ -f "$IPA_PATH" ]; then
426+
# IPA_SIZE=$(stat -c%s "$IPA_PATH")
427+
# SHA256=$(sha256sum "$IPA_PATH" | awk '{print $1}')
428+
# else
429+
# IPA_SIZE=0
430+
# SHA256=""
431+
# fi
432+
#
433+
# VERSION_DATE_ISO=$(date -u +"%Y-%m-%dT%H:%M:%S%z")
434+
# MIN_OS="16.0"
435+
# FULL_DATE=$(date +%Y%m%d%H%M%S)
436+
#
437+
# ICON_URL="https://raw.githubusercontent.com/ProStore-iOS/ProStore-iOS.github.io/refs/heads/main/ProStore_icon.png"
438+
# BUNDLE="com.prostoreios.prostore"
439+
# META_DESC="The BEST alternative app store for iOS!"
440+
# DEVNAME="ProStore iOS"
441+
# SCREENSHOTS='["https://raw.githubusercontent.com/ProStore-iOS/ProStore/refs/heads/main/gallery/Screenshot1.png","https://raw.githubusercontent.com/ProStore-iOS/ProStore/refs/heads/main/gallery/Screenshot2.png","https://raw.githubusercontent.com/ProStore-iOS/ProStore/refs/heads/main/gallery/Screenshot3.png","https://raw.githubusercontent.com/ProStore-iOS/ProStore/refs/heads/main/gallery/Screenshot4.png","https://raw.githubusercontent.com/ProStore-iOS/ProStore/refs/heads/main/gallery/Screenshot5.png"]'
442+
#
443+
# PAGES_REPO="ProStore-iOS/ProStore-iOS.github.io"
444+
# PAGES_DIR=$(mktemp -d)
445+
#
446+
# echo "Cloning pages repo (masked token)..."
447+
# git clone --depth 1 "https://x-access-token:${PAGES_PAT}@github.com/${PAGES_REPO}.git" "$PAGES_DIR"
448+
#
449+
# cd "$PAGES_DIR"
450+
# REPO_FILE="apps.json"
451+
#
452+
# # Create base repo JSON if missing (first run only)
453+
# if [ ! -f "$REPO_FILE" ]; then
454+
# jq -n --arg icon "$ICON_URL" '{
455+
# name: "Official ProStore Repo",
456+
# identifier: "com.prostoreios.prostore.repo",
457+
# sourceURL: "https://ProStore-iOS.github.io/apps.json",
458+
# iconURL: $icon,
459+
# website: "https://ProStore-iOS.github.io",
460+
# subtitle: "The BEST alternative app store for iOS!",
461+
# apps: []
462+
# }' > "$REPO_FILE"
463+
# fi
464+
#
465+
# TMP=$(mktemp)
466+
#
467+
# # Build the JSON representation of the new version (on one line to avoid parser issues)
468+
# NEW_VERSION=$(jq -c -n \
469+
# --arg version "$VERSION" \
470+
# --arg date "$VERSION_DATE_ISO" \
471+
# --arg desc "$CHANGELOG" \
472+
# --arg url "$DOWNLOAD_URL" \
473+
# --arg sha "$SHA256" \
474+
# --arg minos "$MIN_OS" \
475+
# --arg fulldate "$FULL_DATE" \
476+
# --argjson size "$IPA_SIZE" \
477+
# '{version: $version, date: $date, localizedDescription: $desc, downloadURL: $url, size: $size, sha256: $sha, minOSVersion: $minos, fullDate: $fulldate}')
478+
#
479+
# # Single-line jq filter (YAML-friendly, with .apps //= [] for robustness)
480+
# JQ_QUERY='(.apps //= []) | if ( .apps | map(.bundleIdentifier // .bundleID) | index($bundle) ) then .apps |= map( if ((.bundleIdentifier // .bundleID) == $bundle) then ( { "name": $name, "bundleIdentifier": $bundle, "developerName": $dev, "localizedDescription": $appdesc, "iconURL": $icon, "screenshotURLs": $screenshots } + { "versions": ( [ $newVer ] + ( .versions // [] ) ) } ) else . end ) else .apps += [ { "name": $name, "bundleIdentifier": $bundle, "developerName": $dev, "localizedDescription": $appdesc, "iconURL": $icon, "screenshotURLs": $screenshots, "versions": [ $newVer ] } ] end'
481+
#
482+
# # Update or create the app entry (pass screenshots as argjson directly)
483+
# jq --argjson newVer "$NEW_VERSION" \
484+
# --arg name "ProStore" \
485+
# --arg bundle "$BUNDLE" \
486+
# --arg dev "$DEVNAME" \
487+
# --arg appdesc "$META_DESC" \
488+
# --arg icon "$ICON_URL" \
489+
# --argjson screenshots "$SCREENSHOTS" \
490+
# "$JQ_QUERY" "$REPO_FILE" > "$TMP" && mv "$TMP" "$REPO_FILE"
491+
#
492+
# git config user.name "github-actions[bot]"
493+
# git config user.email "github-actions[bot]@users.noreply.github.com"
494+
#
495+
# # Only commit if there's a change
496+
# git add "$REPO_FILE"
497+
# if git diff --quiet --cached; then
498+
# echo "No changes to apps.json — nothing to commit/push."
499+
# exit 0
500+
# fi
501+
#
502+
# git commit -m "Update apps.json for ProStore v${VERSION}"
503+
# echo "Pushing apps.json to ${PAGES_REPO}:main"
504+
# git push "https://x-access-token:${PAGES_PAT}@github.com/${PAGES_REPO}.git" HEAD:main
505+
# shell: bash

0 commit comments

Comments
 (0)