Skip to content

fix: update release

fix: update release #5

Workflow file for this run

# .github/workflows/release.yml
name: Create Releases
on:
push:
branches:
- main
- master
workflow_dispatch:
inputs:
version:
description: 'Version (e.g., 1.0.3-4)'
required: true
env:
# Використовуємо commit hash для версії Android або input version
ANDROID_VERSION: ${{ github.event.inputs.version || github.sha }}
jobs:
android-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Get short commit hash
id: vars
run: echo "short_sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build Android Demo APK
run: |
cd android-demo
./gradlew assembleRelease --no-daemon
- name: Create Android Release
uses: softprops/action-gh-release@v1
with:
tag_name: android-${{ github.event.inputs.version || steps.vars.outputs.short_sha }}
name: Android SDK ${{ github.event.inputs.version || steps.vars.outputs.short_sha }}
body: |
# Android SDK Release
**What's included:**
- `perch-eye-*.aar` - Android library
- `app-release.apk` - Demo application APK
**Build from commit:** ${{ github.sha }}
files: |
android-aar/*.aar
android-demo/app/build/outputs/apk/release/app-release.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ios-release:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'
- name: Build iOS XCFramework
run: |
cd ios
if [ -f "build_xcframework.sh" ]; then
chmod +x build_xcframework.sh
./build_xcframework.sh
else
echo "❌ XCFramework build failed - missing dependencies"
echo "Creating source package instead..."
mkdir -p build_framework
cp -r . build_framework/PerchEyeFramework-Sources
echo "⚠️ This package contains sources only. Build manually." > build_framework/BUILD_INSTRUCTIONS.txt
fi
- name: Package iOS Release
run: |
cd ios
if [ -d "build_framework/PerchEyeSDK-iOS.xcframework" ]; then
echo "✅ Packaging XCFramework..."
# Створюємо ZIP з XCFramework
cd build_framework
zip -r ../PerchEyeSDK-iOS.xcframework.zip PerchEyeSDK-iOS.xcframework/
cd ..
# Додаємо демо проект окремо
if [ -d "../ios-demo" ]; then
zip -r ios-demo.zip ../ios-demo/
fi
else
echo "⚠️ Packaging sources..."
# Пакуємо сирці якщо build не вдалося
zip -r PerchEyeFramework-Sources.zip build_framework/ ../ios-demo/
fi
- name: Create iOS Release
uses: softprops/action-gh-release@v1
with:
tag_name: ios-v1.0.0
name: iOS SDK v1.0.0
body: |
# iOS SDK Release v1.0.0
**What's included:**
- `PerchEyeSDK-iOS.xcframework.zip` - Ready-to-use XCFramework
- `ios-demo.zip` - Demo application project
**How to use:**
1. Download `PerchEyeSDK-iOS.xcframework.zip`
2. Extract and drag `PerchEyeSDK-iOS.xcframework` into your Xcode project
3. Set framework to "Embed & Sign" in target settings
4. Import: `import PerchEyeFramework`
**Build from commit:** ${{ github.sha }}
files: |
ios/PerchEyeSDK-iOS.xcframework.zip
ios/ios-demo.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docs-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
- name: Create Docs Release
uses: softprops/action-gh-release@v1
with:
tag_name: docs-v1.0.0
name: Documentation v1.0.0
body: |
# Documentation v1.0.0
📖 **Live Documentation:** https://onix-systems.github.io/PerchEye-SDK-Multiplatform
Visit the link above for the latest documentation.
No files attached - documentation is available online only.
**Updated from commit:** ${{ github.sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}