From 272cd1ddbb6dbce662901b9e4e81e6c9a4720975 Mon Sep 17 00:00:00 2001 From: Anka Date: Sun, 8 Dec 2024 04:21:16 +0000 Subject: [PATCH 1/6] KMP SPM package release for 0.1.8-hello --- Package.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index c3ef24c..0dd783b 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/211855495.zip" +let remoteKotlinChecksum = "d062ec7d7607f1f799a6b9206e56e0537e0ce2fa7b406f26eab1bf9021f0eae7" 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 ) , ] From 7fc2597416b8ec1df939120f2491adcf18032848 Mon Sep 17 00:00:00 2001 From: Kevin Galligan Date: Sun, 8 Dec 2024 11:00:04 -0500 Subject: [PATCH 2/6] Publish dev builds to branch --- .github/workflows/KMMBridge-Debug.yml | 28 ++++++++++++++++----------- gradle/libs.versions.toml | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/KMMBridge-Debug.yml b/.github/workflows/KMMBridge-Debug.yml index 2949773..2af2d3d 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,25 @@ 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 }}" + + - id: trimcommit + uses: prompt/actions-commit-hash@v3 + with: + commit: ${{ github.sha }} + - 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 -PLIBRARY_VERSION=${{ steps.versionPropertyValue.outputs.propVal }} -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/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" From 4b97ddf84b81a000447bd50c7a7e0e55d9aca8fe Mon Sep 17 00:00:00 2001 From: Kevin Galligan Date: Sun, 8 Dec 2024 13:18:51 -0500 Subject: [PATCH 3/6] Start 0.1.9 development --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 9d5f83d7c5baaef59dc4ff0cdc782eeb8cad9829 Mon Sep 17 00:00:00 2001 From: kpgalligan Date: Sun, 8 Dec 2024 18:27:30 +0000 Subject: [PATCH 4/6] KMP SPM package update --- Package.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 0dd783b..ded82b6 100644 --- a/Package.swift +++ b/Package.swift @@ -2,8 +2,8 @@ import PackageDescription // BEGIN KMMBRIDGE VARIABLES BLOCK (do not edit) -let remoteKotlinUrl = "https://api.github.com/repos/touchlab/KMMBridgeDevFlowTest/releases/assets/211855495.zip" -let remoteKotlinChecksum = "d062ec7d7607f1f799a6b9206e56e0537e0ce2fa7b406f26eab1bf9021f0eae7" +let remoteKotlinUrl = "https://api.github.com/repos/touchlab/KMMBridgeDevFlowTest/releases/assets/211930762.zip" +let remoteKotlinChecksum = "412b6b9be4ba9e2548ec3f14a11eafd9f83686fdb04b3b7c5b86306c771ba311" let packageName = "allshared" // END KMMBRIDGE BLOCK From d1787ebc631ddcfa1478fe60739d7a8dc56a8306 Mon Sep 17 00:00:00 2001 From: Kevin Galligan Date: Sun, 8 Dec 2024 14:05:49 -0500 Subject: [PATCH 5/6] Update code --- .../iosMain/kotlin/co.touchlab/kmmbridgekickstart/StartSDK.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 6a017e45279aa0c22daa0e47fd287db1cb1b8277 Mon Sep 17 00:00:00 2001 From: Kevin Galligan Date: Sun, 8 Dec 2024 14:25:45 -0500 Subject: [PATCH 6/6] Try release build --- .github/workflows/KMMBridge-Debug.yml | 7 +------ .github/workflows/KMMBridge-Release.yml | 9 ++++++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/KMMBridge-Debug.yml b/.github/workflows/KMMBridge-Debug.yml index 2af2d3d..b7c634c 100644 --- a/.github/workflows/KMMBridge-Debug.yml +++ b/.github/workflows/KMMBridge-Debug.yml @@ -53,13 +53,8 @@ jobs: draft: true tag_name: "dev-${{ steps.versionPropertyValue.outputs.propVal }}" - - id: trimcommit - uses: prompt/actions-commit-hash@v3 - with: - commit: ${{ github.sha }} - - name: Build Main - run: ./gradlew kmmBridgePublish -PLIBRARY_VERSION=${{ steps.versionPropertyValue.outputs.propVal }} -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 + 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" 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"