Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 48 additions & 3 deletions .github/actions/apply-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ runs:

echo "Applied version $INPUT_VERSION (MSIX: $MSIX_VERSION, productName: '$PRODUCT_NAME', appstore: $APPSTORE_IDENTIFIER, windows: $WINDOWS_IDENTIFIER)"

# macOS and Windows bundlers both read icons straight out of
# src-tauri/icons at build time (tauri.conf.json's bundle.icon list,
# and tauri-windows-bundle's hardcoded src-tauri/icons lookup), so
# swapping the staging icon set in here — before those bundlers run —
# is enough to make staging builds visually distinct from release on
# a device that has both installed. Only touches the checkout for
# this CI run, never committed.
- name: Select app icon set
shell: bash
env:
INPUT_STAGING: ${{ inputs.staging }}
run: |
set -e

if [[ "$INPUT_STAGING" == "true" && -d "src-tauri/icons-staging" ]]; then
cp src-tauri/icons-staging/32x32.png src-tauri/icons-staging/64x64.png \
src-tauri/icons-staging/128x128.png "src-tauri/icons-staging/128x128@2x.png" \
src-tauri/icons-staging/icon.png src-tauri/icons-staging/icon.icns src-tauri/icons-staging/icon.ico \
src-tauri/icons-staging/Square*.png src-tauri/icons-staging/StoreLogo.png \
src-tauri/icons/
echo "Using staging icon set (src-tauri/icons-staging)"
else
echo "Using release icon set (src-tauri/icons)"
fi

- name: Apply macOS-specific settings
if: ${{ runner.os == 'macOS' }}
shell: bash
Expand Down Expand Up @@ -117,9 +142,11 @@ runs:
SEMVER=$(echo "$INPUT_VERSION" | cut -d. -f1-3)

if [[ "$INPUT_STAGING" == "true" ]]; then
PRODUCT_NAME="Scriptio (Staging)"
DISPLAY_NAME="Scriptio (Staging)"
PRODUCT_NAME="Scriptio_Staging"
IOS_IDENTIFIER="app.scriptio.staging"
else
DISPLAY_NAME="Scriptio"
PRODUCT_NAME="Scriptio"
IOS_IDENTIFIER="app.scriptio"
fi
Expand All @@ -129,12 +156,17 @@ runs:
# identity there. CFBundleShortVersionString is the 3-part marketing
# version; CFBundleVersion uses the full 4-part string so it strictly
# increases across every staging push and release bump (TestFlight
# rejects duplicate/decreasing build numbers).
# rejects duplicate/decreasing build numbers). PRODUCT_NAME drives the
# actual executable filename (CFBundleExecutable), which App Store
# Connect rejects if it contains parens/brackets/etc, so it must stay
# identifier-safe — the parenthesized name is only used for
# CFBundleDisplayName, the home-screen label.
sed -i.bak \
-e "s|^ PRODUCT_NAME:.*| PRODUCT_NAME: ${PRODUCT_NAME}|" \
-e "s|^ PRODUCT_BUNDLE_IDENTIFIER:.*| PRODUCT_BUNDLE_IDENTIFIER: ${IOS_IDENTIFIER}|" \
-e "s|^ CFBundleShortVersionString:.*| CFBundleShortVersionString: ${SEMVER}|" \
-e "s|^ CFBundleVersion:.*| CFBundleVersion: \"${INPUT_VERSION}\"|" \
-e "s|^ CFBundleDisplayName:.*| CFBundleDisplayName: ${DISPLAY_NAME}|" \
src-tauri/gen/apple/project.yml
rm -f src-tauri/gen/apple/project.yml.bak

Expand All @@ -143,6 +175,19 @@ runs:
for plist in src-tauri/gen/apple/*/Info.plist; do
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${SEMVER}" "$plist" || true
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${INPUT_VERSION}" "$plist" || true
/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName ${DISPLAY_NAME}" "$plist" || true
done

echo "Applied iOS settings (name: '$PRODUCT_NAME', id: $IOS_IDENTIFIER, short: $SEMVER, build: $INPUT_VERSION)"
# src-tauri/icons/ios (or icons-staging/ios) is never read by the
# Xcode build directly — Assets.xcassets in gen/apple is a separate,
# committed copy that only xcodegen/xcodebuild actually see. Keep
# them in sync here so the right icon set (and any future icon
# regeneration) reaches the shipped binary.
IOS_ICON_SRC="src-tauri/icons/ios"
if [[ "$INPUT_STAGING" == "true" && -d "src-tauri/icons-staging/ios" ]]; then
IOS_ICON_SRC="src-tauri/icons-staging/ios"
fi
cp "$IOS_ICON_SRC"/*.png src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/
echo "Synced iOS app icons from $IOS_ICON_SRC"

echo "Applied iOS settings (name: '$PRODUCT_NAME', display: '$DISPLAY_NAME', id: $IOS_IDENTIFIER, short: $SEMVER, build: $INPUT_VERSION)"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src-tauri/gen/apple/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ configs:
settingGroups:
app:
base:
PRODUCT_NAME: Scriptio (Staging)
PRODUCT_NAME: Scriptio_Staging
PRODUCT_BUNDLE_IDENTIFIER: app.scriptio
DEVELOPMENT_TEAM: G93CJ6PWZH
targetTemplates:
Expand Down Expand Up @@ -54,6 +54,7 @@ targets:
- UIInterfaceOrientationLandscapeRight
CFBundleShortVersionString: 2.1.0
CFBundleVersion: "2.1.0"
CFBundleDisplayName: Scriptio (Staging)
entitlements:
path: Scriptio_iOS/Scriptio_iOS.entitlements
scheme:
Expand Down
Binary file added src-tauri/icons-staging/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-tauri/icons-staging/128x128@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-tauri/icons-staging/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-tauri/icons-staging/64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-tauri/icons-staging/Square107x107Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-tauri/icons-staging/Square142x142Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-tauri/icons-staging/Square150x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-tauri/icons-staging/Square284x284Logo.png
Binary file added src-tauri/icons-staging/Square30x30Logo.png
Binary file added src-tauri/icons-staging/Square310x310Logo.png
Binary file added src-tauri/icons-staging/Square44x44Logo.png
Binary file added src-tauri/icons-staging/Square71x71Logo.png
Binary file added src-tauri/icons-staging/Square89x89Logo.png
Binary file added src-tauri/icons-staging/StoreLogo.png
Binary file added src-tauri/icons-staging/app-icon.png
Binary file added src-tauri/icons-staging/icon.icns
Binary file not shown.
Binary file added src-tauri/icons-staging/icon.ico
Binary file not shown.
Binary file added src-tauri/icons-staging/icon.png
Binary file modified src-tauri/icons/ios/AppIcon-20x20@1x.png
Binary file modified src-tauri/icons/ios/AppIcon-20x20@2x-1.png
Binary file modified src-tauri/icons/ios/AppIcon-20x20@2x.png
Binary file modified src-tauri/icons/ios/AppIcon-20x20@3x.png
Binary file modified src-tauri/icons/ios/AppIcon-29x29@1x.png
Binary file modified src-tauri/icons/ios/AppIcon-29x29@2x-1.png
Binary file modified src-tauri/icons/ios/AppIcon-29x29@2x.png
Binary file modified src-tauri/icons/ios/AppIcon-29x29@3x.png
Binary file modified src-tauri/icons/ios/AppIcon-40x40@1x.png
Binary file modified src-tauri/icons/ios/AppIcon-40x40@2x-1.png
Binary file modified src-tauri/icons/ios/AppIcon-40x40@2x.png
Binary file modified src-tauri/icons/ios/AppIcon-40x40@3x.png
Binary file modified src-tauri/icons/ios/AppIcon-512@2x.png
Binary file modified src-tauri/icons/ios/AppIcon-60x60@2x.png
Binary file modified src-tauri/icons/ios/AppIcon-60x60@3x.png
Binary file modified src-tauri/icons/ios/AppIcon-76x76@1x.png
Binary file modified src-tauri/icons/ios/AppIcon-76x76@2x.png
Binary file modified src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png
Loading