1
1
name : KMMBridge Android and iOS Publish
2
2
on :
3
3
workflow_dispatch :
4
+
4
5
jobs :
5
- call-kmmbridge-publish :
6
- permissions :
7
- contents : write
8
- packages : write
9
- uses : touchlab/KMMBridge/.github/workflows/spmbuildpublish.yml@kpg/kmmbridge-1.0
10
- with :
11
- jvmVersion : 17
12
- publishTask : kmmBridgePublish publishKotlinMultiplatformPublicationToGitHubPackagesRepository publishAndroidDebugPublicationToGitHubPackagesRepository publishAndroidReleasePublicationToGitHubPackagesRepository
13
- versionProperty : LIBRARY_VERSION
6
+ kmmbridgepublish :
7
+ concurrency : " kmmbridgepublish-${{ github.repository }}"
8
+ runs-on : ${{ inputs.runsOn }}
9
+ steps :
10
+ - name : Checkout the repo with tags
11
+ uses : actions/checkout@v4
12
+ with :
13
+ fetch-depth : 0
14
+ fetch-tags : true
15
+
16
+ - uses : touchlab/read-property@0.1
17
+ id : versionPropertyValue
18
+ with :
19
+ file : ./gradle.properties
20
+ property : LIBRARY_VERSION
21
+
22
+ - name : Print versionPropertyValue
23
+ id : output
24
+ run : echo "${{ steps.versionPropertyValue.outputs.propVal }}"
25
+
26
+ - name : Touchlab Sample Sanity Check (Ignore this for your CI)
27
+ uses : touchlab/sample-group-sanity-check@main
28
+
29
+ - uses : actions/setup-java@v2
30
+ with :
31
+ distribution : " adopt"
32
+ java-version : 17
33
+
34
+ - name : Validate Gradle Wrapper
35
+ uses : gradle/wrapper-validation-action@v1
36
+
37
+ - name : Cache build tooling
38
+ uses : actions/cache@v3
39
+ with :
40
+ path : |
41
+ ~/.gradle/caches
42
+ ~/.konan
43
+ key : ${{ runner.os }}-v4-${{ hashFiles('*.gradle.kts') }}
44
+
45
+ - name : Build Main
46
+ run : ./gradlew kmmBridgePublish publishKotlinMultiplatformPublicationToGitHubPackagesRepository publishAndroidDebugPublicationToGitHubPackagesRepository publishAndroidReleasePublicationToGitHubPackagesRepository -PENABLE_PUBLISHING=true -PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} -PGITHUB_REPO=${{ github.repository }} --no-daemon --info --stacktrace
47
+ env :
48
+ GRADLE_OPTS : -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m"
49
+
50
+ - uses : touchlab/ga-update-release-tag@v1
51
+ id : update-release-tag
52
+ with :
53
+ commitMessage : " KMP SPM package release for ${{ steps.versionPropertyValue.outputs.propVal }}"
54
+ tagMessage : " KMP release version ${{ steps.versionPropertyValue.outputs.propVal }}"
55
+ tagVersion : ${{ steps.versionPropertyValue.outputs.propVal }}
0 commit comments