name: Build All Platforms on: push: tags: - 'v*' workflow_dispatch: jobs: # ==================== Desktop Client (Electron) ==================== build-windows: runs-on: windows-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - name: Install dependencies run: npm install working-directory: client - name: Build Windows (x64 NSIS + Portable) run: npm run dist:win working-directory: client env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload Windows artifacts uses: actions/upload-artifact@v4 with: name: windows-builds path: | client/release/*.exe client/release/*.exe.blockmap build-macos: runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - name: Install dependencies run: npm install working-directory: client - name: Build macOS (x64 + arm64 DMG) run: npm run dist:mac working-directory: client env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload macOS artifacts uses: actions/upload-artifact@v4 with: name: macos-builds path: | client/release/*.dmg client/release/*.dmg.blockmap build-linux: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - name: Install dependencies run: npm install working-directory: client - name: Build Linux (AppImage + deb) run: npm run dist:linux working-directory: client env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload Linux artifacts uses: actions/upload-artifact@v4 with: name: linux-builds path: | client/release/*.AppImage client/release/*.deb # ==================== Mobile Client (Expo / React Native) ==================== build-android: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17' - name: Setup Android SDK uses: android-actions/setup-android@v3 - name: Install dependencies run: npm install working-directory: mobile - name: Generate native project run: npx expo prebuild --platform android --no-install working-directory: mobile - name: Build Android APK run: | cd android chmod +x gradlew ./gradlew assembleRelease working-directory: mobile - name: Upload Android APK uses: actions/upload-artifact@v4 with: name: android-builds path: mobile/android/app/build/outputs/apk/release/*.apk build-ios: runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - name: Install dependencies run: npm install working-directory: mobile - name: Generate native project run: npx expo prebuild --platform ios --no-install working-directory: mobile - name: Install CocoaPods run: cd ios && pod install working-directory: mobile - name: Build iOS (unsigned simulator) run: | xcodebuild \ -workspace ios/FunConnect.xcworkspace \ -scheme FunConnect \ -configuration Release \ -sdk iphonesimulator \ -derivedDataPath build \ CODE_SIGNING_ALLOWED=NO working-directory: mobile - name: Package iOS build run: | cd build/Build/Products/Release-iphonesimulator zip -r ../../../../FunConnect-ios-simulator.zip FunConnect.app working-directory: mobile - name: Upload iOS artifacts uses: actions/upload-artifact@v4 with: name: ios-builds path: mobile/FunConnect-ios-simulator.zip # ==================== Mobile JS Bundles ==================== export-bundles: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - name: Install dependencies run: npm install working-directory: mobile - name: Export Android bundle run: npx expo export --platform android --output-dir release/android-bundle working-directory: mobile - name: Export iOS bundle run: npx expo export --platform ios --output-dir release/ios-bundle working-directory: mobile - name: Upload bundles uses: actions/upload-artifact@v4 with: name: mobile-bundles path: | mobile/release/android-bundle/ mobile/release/ios-bundle/ # ==================== Create Release ==================== release: needs: [build-windows, build-macos, build-linux, build-android, export-bundles] runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') steps: - name: Download all artifacts uses: actions/download-artifact@v4 with: path: artifacts - name: List artifacts run: find artifacts -type f | head -50 - name: Create Release uses: softprops/action-gh-release@v1 with: files: | artifacts/windows-builds/* artifacts/macos-builds/* artifacts/linux-builds/* artifacts/android-builds/* draft: false prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}