diff --git a/.github/workflows/KMMBridge-Debug.yml b/.github/workflows/KMMBridge-Debug.yml index 2949773..b7c634c 100644 --- a/.github/workflows/KMMBridge-Debug.yml +++ b/.github/workflows/KMMBridge-Debug.yml @@ -27,11 +27,6 @@ jobs: id: output run: echo "${{ steps.versionPropertyValue.outputs.propVal }}" - - id: trimcommit - uses: prompt/actions-commit-hash@v3 - with: - commit: ${{ github.sha }} - - name: Touchlab Sample Sanity Check (Ignore this for your CI) uses: touchlab/sample-group-sanity-check@main @@ -51,14 +46,20 @@ jobs: ~/.konan key: ${{ runner.os }}-v4-${{ hashFiles('*.gradle.kts') }} + - name: Create or Find Artifact Release + id: devrelease + uses: softprops/action-gh-release@v2 + with: + draft: true + tag_name: "dev-${{ steps.versionPropertyValue.outputs.propVal }}" + - name: Build Main - run: ./gradlew kmmBridgePublish -PLIBRARY_VERSION=${{ steps.versionPropertyValue.outputs.propVal }} -PENABLE_PUBLISHING=true -PNATIVE_BUILD_TYPE=DEBUG -PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} -PGITHUB_REPO=${{ github.repository }} --no-daemon --info --stacktrace + run: ./gradlew kmmBridgePublish -PENABLE_PUBLISHING=true -PNATIVE_BUILD_TYPE=DEBUG -PGITHUB_ARTIFACT_RELEASE_ID=${{ steps.devrelease.outputs.id }} -PGITHUB_ARTIFACT_IDENTIFIER_NAME=${{ steps.trimcommit.outputs.short }} -PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} -PGITHUB_REPO=${{ github.repository }} --no-daemon --info --stacktrace env: GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m" - - uses: touchlab/ga-update-release-tag@v1 - id: update-release-tag + - uses: EndBug/add-and-commit@v9 with: - commitMessage: "KMP SPM package release for ${{ steps.versionPropertyValue.outputs.propVal }}" - tagMessage: "KMP release version ${{ steps.versionPropertyValue.outputs.propVal }}" - tagVersion: ${{ steps.versionPropertyValue.outputs.propVal }} \ No newline at end of file + message: "KMP SPM package update" + committer_name: GitHub Actions + committer_email: 41898282+github-actions[bot]@users.noreply.github.com \ No newline at end of file diff --git a/.github/workflows/KMMBridge-Release.yml b/.github/workflows/KMMBridge-Release.yml index 25e693b..41e6bf8 100644 --- a/.github/workflows/KMMBridge-Release.yml +++ b/.github/workflows/KMMBridge-Release.yml @@ -46,8 +46,15 @@ jobs: ~/.konan key: ${{ runner.os }}-v4-${{ hashFiles('*.gradle.kts') }} + - name: Create or Find Artifact Release + id: devrelease + uses: softprops/action-gh-release@v2 + with: + draft: true + tag_name: ${{ steps.versionPropertyValue.outputs.propVal }} + - name: Build Main - run: ./gradlew publishKotlinMultiplatformPublicationToGitHubPackagesRepository publishAndroidDebugPublicationToGitHubPackagesRepository publishAndroidReleasePublicationToGitHubPackagesRepository kmmBridgePublish -PENABLE_PUBLISHING=true -PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} -PGITHUB_REPO=${{ github.repository }} --no-daemon --info --stacktrace + run: ./gradlew publishKotlinMultiplatformPublicationToGitHubPackagesRepository publishAndroidDebugPublicationToGitHubPackagesRepository publishAndroidReleasePublicationToGitHubPackagesRepository kmmBridgePublish -PENABLE_PUBLISHING=true -PGITHUB_ARTIFACT_RELEASE_ID=${{ steps.devrelease.outputs.id }} -PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} -PGITHUB_REPO=${{ github.repository }} --no-daemon --info --stacktrace env: GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m" diff --git a/Package.swift b/Package.swift index c3ef24c..ded82b6 100644 --- a/Package.swift +++ b/Package.swift @@ -1,7 +1,11 @@ // swift-tools-version:5.8 import PackageDescription +// BEGIN KMMBRIDGE VARIABLES BLOCK (do not edit) +let remoteKotlinUrl = "https://api.github.com/repos/touchlab/KMMBridgeDevFlowTest/releases/assets/211930762.zip" +let remoteKotlinChecksum = "412b6b9be4ba9e2548ec3f14a11eafd9f83686fdb04b3b7c5b86306c771ba311" let packageName = "allshared" +// END KMMBRIDGE BLOCK let package = Package( name: packageName, @@ -17,7 +21,8 @@ let package = Package( targets: [ .binaryTarget( name: packageName, - path: "./allshared/build/XCFrameworks/debug/\(packageName).xcframework" + url: remoteKotlinUrl, + checksum: remoteKotlinChecksum ) , ] diff --git a/allshared/src/iosMain/kotlin/co.touchlab/kmmbridgekickstart/StartSDK.kt b/allshared/src/iosMain/kotlin/co.touchlab/kmmbridgekickstart/StartSDK.kt index fd476f1..d824f85 100644 --- a/allshared/src/iosMain/kotlin/co.touchlab/kmmbridgekickstart/StartSDK.kt +++ b/allshared/src/iosMain/kotlin/co.touchlab/kmmbridgekickstart/StartSDK.kt @@ -9,4 +9,4 @@ fun startSDK(analytics: Analytics): SDKHandle { ) } -fun sayHello() = "Hello from Kotlin!" \ No newline at end of file +fun sayHello() = "Hello again from Kotlin!" \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 4800c4c..d905c10 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,6 @@ kotlin.code.style=official android.useAndroidX=true org.gradle.jvmargs=-Xmx4g -LIBRARY_VERSION=0.1.8-hello +LIBRARY_VERSION=0.1.9 GROUP=co.touchlab.kmmbridgespmquickstart org.gradle.configuration-cache=true \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7a3db91..52d1adf 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,7 +6,7 @@ compileSdk = "34" # Dependencies kotlin = "2.0.10" -kmmBridge = "1.1.1" +kmmBridge = "1.1.2-a1" android-gradle-plugin = "8.2.0" coroutines = "1.8.1" kotlinx-datetime = "0.6.0"