Skip to content

build: lettin GH see this pipeline #1

build: lettin GH see this pipeline

build: lettin GH see this pipeline #1

name: Build XCFramework
on:
release:
types: [published]
workflow_dispatch: # Manual trigger
push: # temporal, letting GH know this exist
jobs:
build-xcframework:
name: Build iOS XCFramework
runs-on: macos-latest # Required for Xcode
timeout-minutes: 60
permissions:
contents: write # Required for uploading release assets
steps:
- name: Configure Git
run: |
git config --global core.autocrlf input
- uses: actions/checkout@v5
- name: Extract version
id: version
run: |
if [ "${{ github.event_name }}" == "release" ]; then
VERSION="${{ github.event.release.tag_name }}"
else
VERSION="${{ github.sha }}"
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Using version: $VERSION"
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: 17
distribution: corretto
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: false
- name: Verify Xcode installation
run: xcodebuild -version
- name: Build XCFramework
env:
JAVA_OPTS: "-Xms8g -Xmx8g -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dkotlin.daemon.jvm.options=-Xmx6g"
run: |
echo "Assembling XCFramework binary..."
./gradlew :koog-agents:assembleXCFramework --no-daemon --stacktrace
echo "XCFramework binary assembled"
- name: Create XCFramework zip
run: |
cd koog-agents/build/XCFrameworks/release
zip -r koog_agents-${{ steps.version.outputs.version }}.xcframework.zip koog_agents.xcframework
echo "XCFramework zip created:"
ls -lh koog_agents-${{ steps.version.outputs.version }}.xcframework.zip
# Calculate checksum for SPM
shasum -a 256 koog_agents-${{ steps.version.outputs.version }}.xcframework.zip
- name: Upload XCFramework artifact
uses: actions/upload-artifact@v4
with:
name: koog-agents-xcframework-${{ steps.version.outputs.version }}
path: koog-agents/build/XCFrameworks/release/koog_agents-${{ steps.version.outputs.version }}.xcframework.zip
retention-days: 30
- name: Upload to release
if: false # Temporarily disabled
#if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: koog-agents/build/XCFrameworks/release/koog_agents-${{ steps.version.outputs.version }}.xcframework.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}