nodeshiftmusicburmalda/.github/workflows/main.yml
2026-05-05 20:04:33 +05:00

83 lines
2.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Build iOS IPA (No-Updates Fix)
on:
push:
branches: [main, master]
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: |
npm install --legacy-peer-deps
# Ставим плагин для фикса track-player, если его нет
npm install @expo/config-plugins --save-dev
- name: Patch Project (Remove EXUpdates)
run: |
# Вырезаем expo-updates, чтобы Xcode не искал его скрипты
sed -i '' '/"expo-updates"/d' app.json || true
# Твой патч для track-player
PLUGIN_PATH="node_modules/react-native-track-player/app.plugin.js"
cat << 'EOF' > "$PLUGIN_PATH"
const { withInfoPlist } = require('@expo/config-plugins');
module.exports = function(config) {
return withInfoPlist(config, (config) => {
if (!config.modResults.UIBackgroundModes) config.modResults.UIBackgroundModes = [];
if (!config.modResults.UIBackgroundModes.includes('audio')) config.modResults.UIBackgroundModes.push('audio');
return config;
});
};
EOF
- name: Expo prebuild
run: npx expo prebuild --platform ios --clean --no-install
- name: Install CocoaPods
run: cd ios && pod install && cd ..
- name: Build unsigned app
run: |
WORKSPACE_PATH=$(find ios -maxdepth 1 -name "*.xcworkspace" | head -1)
SCHEME_NAME=$(basename "$WORKSPACE_PATH" .xcworkspace)
# Собираем без подписи и БЕЗ падения на скриптах
xcodebuild build \
-workspace "$WORKSPACE_PATH" \
-scheme "$SCHEME_NAME" \
-configuration Release \
-sdk iphoneos \
-derivedDataPath "$RUNNER_TEMP/DerivedData" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGN_IDENTITY="" \
ENABLE_BITCODE=NO | xcpretty
- name: Package IPA
if: always()
run: |
# Ищем .app файл
APP_PATH=$(find "$RUNNER_TEMP/DerivedData/Build/Products" -name "*.app" -type d | grep -v "\.xctest" | head -1)
if [ -z "$APP_PATH" ]; then echo "APP NOT FOUND"; exit 1; fi
mkdir -p Payload
cp -r "$APP_PATH" Payload/
zip -qr burmalda_music.ipa Payload
- name: Upload IPA
uses: actions/upload-artifact@v4
with:
name: Burmalda-IPA-Final
path: burmalda_music.ipa