This repository contains reusable GitHub Actions and Workflows for GetStream projects.
This action bumps major, minor, or patch version in a Kotlin Configuration.kt file. It's designed for Android projects using Kotlin DSL for version management.
The Configuration.kt file must contain the following version constants:
const val majorVersion = X
const val minorVersion = Y
const val patchVersion = Z
jobs:
bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: GetStream/actions_workflows/actions/bump-version@main
with:
bump: 'patch' # Required: major, minor, or patch
file-path: 'buildSrc/src/main/kotlin/io/getstream/Configuration.kt' # Required: Path to Configuration.kt
Input | Description | Required | Type | Options |
---|---|---|---|---|
bump |
Which part of the version to bump | Yes | choice | major, minor, patch |
file-path |
Path to Configuration.kt file containing the version information. The file must contain the required version constants. | Yes | string | - |
Output | Description |
---|---|
RELEASE_VERSION |
The new release version after bumping |
This action sets up a Ruby environment with version 3.1 by default and enables bundler caching for faster dependency installation.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: GetStream/actions_workflows/actions/setup-ruby@main
with:
ruby-version: '3.1' # Optional: Ruby version (default: 3.1)
bundler-cache: 'true' # Optional: Enable bundler caching (default: true)
Input | Description | Required | Default |
---|---|---|---|
ruby-version |
Ruby version to install (e.g., 3.0, 3.1, 3.2) | No | 3.1 |
bundler-cache |
Whether to cache bundler dependencies | No | true |
This action launches Allure TestOps jobs for test reporting and analysis. It's designed to work with Fastlane for test execution and reporting.
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: GetStream/actions_workflows/actions/allure-launch@main
with:
allure-token: ${{ secrets.ALLURE_TOKEN }}
cron: 'false' # Optional: Set to true for scheduled runs
Input | Description | Required | Default |
---|---|---|---|
allure-token |
Allure TestOps authentication token | Yes | - |
cron |
Indicates if this is a scheduled cron job run | No | false |
The action sets the following environment variables:
ALLURE_TOKEN
: Authentication token for Allure TestOpsGITHUB_EVENT
: GitHub event data in JSON format
This action enables hardware accelerated Android virtualization on Actions Linux larger hosted runners. It's required for running Android emulators in GitHub Actions workflows.
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: GetStream/actions_workflows/actions/enable-kvm@main
- name: Run Android tests
run: ./gradlew connectedCheck
The action performs the following operations:
- Creates a udev rule for KVM device access
- Sets appropriate permissions for the KVM group
- Reloads udev rules to apply changes
This action sets up a Java environment with version 17 and Adopt distribution by default.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: GetStream/actions_workflows/actions/setup-java@main
with:
java-version: '17' # Optional: Java version (default: 17)
distribution: 'adopt' # Optional: Java distribution (default: adopt)
Input | Description | Required | Default |
---|---|---|---|
java-version |
Java version to install (e.g., 8, 11, 17, 21) | No | 17 |
distribution |
Java distribution (adopt, temurin, zulu, amazon, microsoft) | No | adopt |
This action caches Gradle dependencies to speed up your workflow execution. It's designed to be used in any Gradle-based project.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: GetStream/actions_workflows/actions/gradle-cache@main
with:
cache-name: 'my-workflow' # Optional: Custom cache name
The action will cache the following Gradle directories:
~/.gradle/caches
~/.gradle/wrapper
The cache key is based on:
- Runner OS
- Custom cache name (if provided)
- Hash of Gradle files (.gradle, gradle-wrapper.properties, and libs.versions.toml)
This workflow automates the complete process of releasing a new version, including version bumping, building, publishing to Maven Central, creating GitHub releases, and synchronizing branches.
- Version bumping (major/minor/patch)
- Maven Central publication
- GitHub release creation
- Branch synchronization (release → main → develop)
- Custom changelog support
- Module exclusion for build
Secret | Description |
---|---|
OSSRH_USERNAME |
Sonatype username |
OSSRH_PASSWORD |
Sonatype password |
SIGNING_KEY_ID |
Signing key ID |
SIGNING_PASSWORD |
Signing key password |
SIGNING_KEY |
Signing key |
SONATYPE_STAGING_PROFILE_ID |
Sonatype staging profile ID |
STREAM_PUBLIC_BOT_TOKEN |
GitHub bot token |
Input | Description | Required | Default |
---|---|---|---|
ref |
Branch or ref to checkout | No | "release" |
bump |
Version bump type (major/minor/patch) | Yes | - |
file-path |
Path to Configuration.kt file containing version constants | Yes | - |
release-notes |
Content of the release notes to be used when publishing | No | "" |
excluded-modules |
Comma-separated list of modules to exclude | No | "stream-chat-android-ui-components-sample,stream-chat-android-compose-sample,stream-chat-android-docs" |
Purpose: Builds and publishes the new version
Steps:
- Checkout code from specified branch
- Bump version using custom action
- Commit version changes
- Push to release branch
- Setup Java environment
- Build release version (with module exclusions)
- Generate source and documentation JARs
- Publish to Maven Central
- Create GitHub release
Purpose: Syncs main branch with release
Steps:
- Checkout main branch
- Merge release into main
- Push changes to main
Purpose: Syncs develop branch with main
Steps:
- Checkout develop branch
- Merge main into develop
- Push changes to develop
- uses: GetStream/actions_workflows/.github/workflows/release-new-version@main
with:
bump: 'minor'
file-path: 'path/to/Configuration.kt'
excluded-modules: 'sample-app,docs'
release-notes: |
## What's Changed
* Feature 1
* Bug fix 1
* Feature 2
secrets:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
STREAM_PUBLIC_BOT_TOKEN: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }}
This workflow measures the size of Android SDK modules and reports the metrics.
jobs:
my-job:
uses: GetStream/actions_workflows/.github/workflows/android-sdk-size.yml@main
with:
modules: "stream-chat-android-client stream-chat-android-compose"
metricsProject: "stream-chat-android-metrics"
ℹ️ Make sure to set up a metrics project with build favors that match with the module. See an example in the Chat SDK