nodeshiftmusicburmalda/.github/workflows/main.yml
2026-05-08 12:59:57 +05:00

89 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: NodeShiftMusic iOS Build
on:
push:
branches: [main, master]
workflow_dispatch:
jobs:
build-ipa:
name: Build Unsigned IPA
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm install --legacy-peer-deps
- name: Fix PNG assets (jimp compat)
run: |
echo "Re-encoding PNGs to strip unsupported filter types..."
find assets -name "*.png" | while read f; do
sips -s format png "$f" --out "$f" 2>/dev/null && echo " fixed: $f" || echo " skip: $f"
done
- name: Expo prebuild
env:
EXPO_NO_DOTENV:
run: npx expo prebuild --platform ios --clean
- name: Install Pods
working-directory: ios
run: pod install --repo-update
- name: Find workspace & scheme
id: xcode
run: |
WS=$(find ios -name "*.xcworkspace" -maxdepth 2 | head -1)
SCHEME=$(basename "$WS" .xcworkspace)
echo "workspace=$WS" >> $GITHUB_OUTPUT
echo "scheme=$SCHEME" >> $GITHUB_OUTPUT
echo "Workspace: $WS | Scheme: $SCHEME"
- name: Build unsigned archive
run: |
xcodebuild archive \
-workspace "${{ steps.xcode.outputs.workspace }}" \
-scheme "${{ steps.xcode.outputs.scheme }}" \
-configuration Release \
-sdk iphoneos \
-archivePath "$RUNNER_TEMP/NodeShiftMusic.xcarchive" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_ALLOWED=NO \
ENABLE_BITCODE=NO \
2>&1 | xcpretty || true
- name: Package IPA
run: |
APPS="$RUNNER_TEMP/NodeShiftMusic.xcarchive/Products/Applications"
mkdir -p Payload
cp -r "$APPS/"*.app Payload/
zip -qr NodeShiftMusic-unsigned.ipa Payload
rm -rf Payload
echo "IPA size: $(du -sh NodeShiftMusic-unsigned.ipa | cut -f1)"
- name: Upload IPA
uses: actions/upload-artifact@v4
with:
name: NodeShiftMusic-unsigned
path: NodeShiftMusic-unsigned.ipa
retention-days: 90
- name: Summary
run: |
echo "## NodeShiftMusic Build" >> $GITHUB_STEP_SUMMARY
echo "Branch: \`${{ github.ref_name }}\`" >> $GITHUB_STEP_SUMMARY
echo "Commit: \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY
if [ -f NodeShiftMusic-unsigned.ipa ]; then
echo "IPA: $(du -sh NodeShiftMusic-unsigned.ipa | cut -f1)" >> $GITHUB_STEP_SUMMARY
echo "Скачай из раздела Artifacts этого run'а" >> $GITHUB_STEP_SUMMARY
fi