KMMBridge-Debug #16
This file contains 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: KMMBridge-Debug | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
kmmbridgepublish: | |
concurrency: "kmmbridgepublish-${{ github.repository }}" | |
runs-on: macos-latest | |
steps: | |
- name: Checkout the repo with tags | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- uses: touchlab/[email protected] | |
id: versionPropertyValue | |
with: | |
file: ./gradle.properties | |
property: LIBRARY_VERSION | |
- name: Print versionPropertyValue | |
id: output | |
run: echo "${{ steps.versionPropertyValue.outputs.propVal }}" | |
- name: Touchlab Sample Sanity Check (Ignore this for your CI) | |
uses: touchlab/sample-group-sanity-check@main | |
- name: Apply SSH Key | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.KMMBRIDGE_SSH_KEY }} | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: "adopt" | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Cache build tooling | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.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 | |
repository: touchlab/KMMBridgeAndroidDevFlowPublish | |
token: ${{ secrets.KMMBRIDGE_PAT_SECRET }} | |
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 -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.KMMBRIDGE_PAT_SECRET }} -PGITHUB_REPO=touchlab/KMMBridgeAndroidDevFlowPublish --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/[email protected] | |
id: push-remote-swift-package | |
with: | |
commitMessage: "KMP SPM package debug build for ${{ github.ref }}" | |
remoteRepo: touchlab/KMMBridgeAndroidDevFlowPublish | |
remoteBranch: ${{ github.ref }} |