Skip to content

Commit

Permalink
Merge pull request #1 from touchlab/testrelease
Browse files Browse the repository at this point in the history
Testrelease
  • Loading branch information
kpgalligan authored Dec 8, 2024
2 parents 71b3c8e + 6a017e4 commit 7b0c149
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 16 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/KMMBridge-Debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}
message: "KMP SPM package update"
committer_name: GitHub Actions
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
9 changes: 8 additions & 1 deletion .github/workflows/KMMBridge-Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
7 changes: 6 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -17,7 +21,8 @@ let package = Package(
targets: [
.binaryTarget(
name: packageName,
path: "./allshared/build/XCFrameworks/debug/\(packageName).xcframework"
url: remoteKotlinUrl,
checksum: remoteKotlinChecksum
)
,
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ fun startSDK(analytics: Analytics): SDKHandle {
)
}

fun sayHello() = "Hello from Kotlin!"
fun sayHello() = "Hello again from Kotlin!"
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 7b0c149

Please sign in to comment.