Skip to content

Release

Release #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*' # Triggers on tags like v0.1.0, v1.0.0
workflow_dispatch: # Allow manual trigger
inputs:
version:
description: 'Version to release (e.g., 0.1.0)'
required: true
type: string
jobs:
release:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Determine version
id: version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
VERSION="${{ github.event.inputs.version }}"
else
VERSION="${GITHUB_REF#refs/tags/v}"
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
- name: Build Release AAR
run: ./gradlew :app:assembleRelease
- name: Build Sample APK
run: ./gradlew :sample:assembleRelease
- name: Create Release Notes
id: release_notes
run: |
cat << EOF > release_notes.md
## LLaMA Kotlin Android v${{ steps.version.outputs.version }}
### Installation
Add to your \`build.gradle.kts\`:
\`\`\`kotlin
dependencies {
implementation("org.codeshipping:llama-kotlin-android:${{ steps.version.outputs.version }}")
}
\`\`\`
### Artifacts
- **llama-kotlin-android-${{ steps.version.outputs.version }}.aar** - The main library
- **sample-release.apk** - Sample application demonstrating usage
### What's Included
- Kotlin-first API for LLaMA inference
- Native llama.cpp backend
- Support for arm64-v8a and x86_64
- Coroutine-based streaming generation
### Maven Central
This release is also available on [Maven Central](https://central.sonatype.com/artifact/org.codeshipping/llama-kotlin-android/${{ steps.version.outputs.version }})
EOF
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: v${{ steps.version.outputs.version }}
tag_name: v${{ steps.version.outputs.version }}
body_path: release_notes.md
draft: false
prerelease: false
files: |
app/build/outputs/aar/app-release.aar
sample/build/outputs/apk/release/sample-release-unsigned.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Summary
run: |
echo "### Release Created! 🎉" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Version:** v${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Artifacts:**" >> $GITHUB_STEP_SUMMARY
echo "- Library AAR" >> $GITHUB_STEP_SUMMARY
echo "- Sample APK" >> $GITHUB_STEP_SUMMARY