Reverted back to kotlinx-browser 0.3 #345
Workflow file for this run
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: Build & Test | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build & Test | |
runs-on: macos-15 | |
steps: | |
- name: Checkout workspace | |
uses: actions/checkout@v4 | |
timeout-minutes: 5 | |
with: | |
fetch-depth: 0 | |
- name: Set up Java JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17.0.16+8' | |
- name: Select XCode 16.4 | |
run: | | |
sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer | |
xcodebuild -version | |
- name: Gradle Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.gradle/native | |
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle.kts') }} | |
restore-keys: ${{ runner.os }}-gradle- | |
- name: Kotlin Native Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.konan | |
key: ${{ runner.os }}-konan-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle.kts') }} | |
restore-keys: ${{ runner.os }}-konan- | |
- name: Android Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.android | |
key: ${{ runner.os }}-android-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle.kts') }} | |
restore-keys: ${{ runner.os }}-android- | |
- name: Build & Test | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
chmod +x ./gradlew | |
./gradlew build test detekt assembleXCFramework --parallel | |
- name: Set RELEASE_VERSION variable | |
run: | | |
echo "RELEASE_VERSION=$(cat build/version.txt)" >> $GITHUB_ENV | |
echo ${{ env.RELEASE_VERSION }} | |
- name: Upload reports | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: reports.zip | |
path: build/reports | |
- name: Upload unit test reference files | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: reference_files.zip | |
path: build/*.* | |
- name: List files | |
run: | | |
ls -lah build/bin/*/releaseExecutable build/libs/ build/outputs/aar/ build/XCFrameworks/release/ | |
- name: Upload kim.jar | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: kim.jar | |
path: build/libs/kim-jvm-${{ env.RELEASE_VERSION }}.jar | |
- name: Upload kim.aar | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: kim.aar | |
path: build/outputs/aar/kim-release.aar | |
- name: Upload kim.xcframework | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: kim.xcframework | |
path: build/XCFrameworks/release/kim.xcframework | |
- name: Upload kim.exe | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: kim.exe | |
path: build/bin/win/releaseExecutable/kim.exe | |
- name: Upload kim-macosX64.kexe | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: kim-macosX64.kexe | |
path: build/bin/macosX64/releaseExecutable/kim.kexe | |
- name: Upload kim-macosArm64.kexe | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: kim-macosArm64.kexe | |
path: build/bin/macosArm64/releaseExecutable/kim.kexe | |
- name: Upload kim-win-lib.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: kim-win-lib.zip | |
path: build/bin/win/releaseStatic | |
- name: Upload kim-linuxArm64.kexe | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: kim-linuxArm64.kexe | |
path: build/bin/linuxArm64/releaseExecutable/kim.kexe | |
- name: Upload kim-linuxX64-lib.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: kim-linuxX64-lib.zip | |
path: build/bin/linuxX64/releaseStatic | |
- name: Upload kim-linuxX64.kexe | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: kim-linuxX64.kexe | |
path: build/bin/linuxX64/releaseExecutable/kim.kexe | |
- name: Upload kim-linuxArm64-lib.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: kim-linuxArm64-lib.zip | |
path: build/bin/linuxArm64/releaseStatic | |
- name: Publish to Maven Central | |
if: startsWith(github.ref, 'refs/tags/') # Only for releases | |
run: ./gradlew publishToMavenCentral --no-configuration-cache | |
env: | |
SIGNING_ENABLED: true | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SINGING_SECRET_KEY_RING_FILE_CONTENTS }} | |