Fixes and adds tests for Kotlin Serialization version compatibility i… #206
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Kotlin | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/kotlin*' | |
- '**/gradle/**' | |
- 'kotlin/**' | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/kotlin*' | |
- '**/gradle/**' | |
- 'kotlin/**' | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: Build Kotlin Multiplatform | |
runs-on: macos-latest | |
env: | |
ORG_GRADLE_PROJECT_githubUsername: ${{ github.actor }} | |
ORG_GRADLE_PROJECT_githubPassword: ${{ github.token }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
id-token: write | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Cache Kotlin packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.konan | |
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.versions.toml') }} | |
restore-keys: | | |
${{ runner.os }}-konan-${{ hashFiles('**/*.versions.toml') }} | |
${{ runner.os }}-konan- | |
- name: Set Version to Tag Name | |
id: tag_name | |
if: github.event_name == 'release' | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT | |
- name: Test | |
env: | |
ORG_GRADLE_PROJECT_version: ${{ steps.tag_name.outputs.VERSION || 'development' }} | |
run: ./gradlew test publishToMavenLocal | |
- name: Test integration w/ minimum required versions | |
run: ./gradlew test -p integration-tests | |
- name: Configure AWS Credentials | |
if: github.repository == 'adsbynimbus/nimbus-openrtb' && github.event_name == 'release' | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ vars.AWS_ROLE }} | |
aws-region: us-east-1 | |
- name: Publish | |
if: github.repository == 'adsbynimbus/nimbus-openrtb' && github.event_name == 'release' | |
env: | |
ORG_GRADLE_PROJECT_version: ${{ steps.tag_name.outputs.VERSION }} | |
run: ./gradlew publish |