diff --git a/.github/workflows/deploy-job.yml b/.github/workflows/deploy-job.yml deleted file mode 100644 index 76752b6..0000000 --- a/.github/workflows/deploy-job.yml +++ /dev/null @@ -1,148 +0,0 @@ -name: KMM Bridge Github Workflow -on: - workflow_call: - inputs: - module: - description: The module name to run the task on if you have mutliple kmp modules - required: false - type: string - publishTask: - description: 'The publish task to call if not kmmBridgePublish' - default: 'kmmBridgePublish' - required: false - type: string - netrcMachine: - description: 'Netrc machine param' - default: 'maven.pkg.github.com' - required: false - type: string - jvmVersion: - description: 'JVM Version to use. Will be passed to java-version parameter of setup-java' - default: '11' - required: false - type: string - runsOn: - description: 'Host parameter to pass to runs-on' - default: 'macos-12' - required: false - type: string - versionBaseProperty: - description: 'Base version key from gradle.properties' - required: true - type: string - retainBuildBranch: - description: 'Keep the build branch after build complete' - default: false - type: boolean - secrets: - gradle_params: - required: false - PODSPEC_SSH_KEY: - required: false - netrcUsername: - description: 'Netrc username param' - required: false - netrcPassword: - description: 'Netrc password param' - required: false - -env: - PODSPEC_SSH_KEY_EXISTS: ${{ secrets.PODSPEC_SSH_KEY != ''}} - MODULE: ${{ inputs.module != '' && format('{0}:',inputs.module) || '' }} - -jobs: - kmmbridgepublish: - concurrency: "kmmbridgepublish-${{ github.repository }}" - runs-on: ${{ inputs.runsOn }} - steps: - - name: Checkout the repo with tags - uses: actions/checkout@v4 - with: - fetch-depth: 0 - fetch-tags: true - - - uses: touchlab/read-property@0.1 - id: versionBasePropertyValue - with: - file: ./gradle.properties - property: ${{ inputs.versionBaseProperty }} - - - name: Print versionBasePropertyValue - id: output - run: echo "${{ steps.versionBasePropertyValue.outputs.propVal }}" - - - name: Touchlab Sample Sanity Check (Ignore this for your CI) - uses: touchlab/sample-group-sanity-check@0.2 - - - uses: touchlab/autoversion-nextversion@main - id: autoversion - with: - versionBase: ${{ steps.versionBasePropertyValue.outputs.propVal }} - - - name: Print Next Version - id: outputversion - run: echo "${{ steps.autoversion.outputs.nextVersion }}" - - - uses: touchlab/autoversion-tagmarker@main - id: autoversion-tagmarker - with: - nextVersion: ${{ steps.autoversion.outputs.nextVersion }} - - - uses: touchlab/autoversion-buildbranch@main - id: autoversion-buildbranch - with: - buildBranch: "build-${{ steps.autoversion.outputs.nextVersion }}" - - - name: Apply SSH Key - if: ${{ env.PODSPEC_SSH_KEY_EXISTS == 'true' }} - uses: webfactory/ssh-agent@v0.5.4 - with: - ssh-private-key: ${{ secrets.PODSPEC_SSH_KEY }} - - - uses: extractions/netrc@v1 - with: - machine: ${{ inputs.netrcMachine }} - username: ${{ secrets.netrcUsername != '' && secrets.netrcUsername || 'cirunner' }} - password: ${{ secrets.netrcPassword != '' && secrets.netrcPassword || secrets.GITHUB_TOKEN }} - - - uses: actions/setup-java@v2 - with: - distribution: "adopt" - java-version: ${{ inputs.jvmVersion }} - - - name: Validate Gradle Wrapper - uses: gradle/wrapper-validation-action@v1 - - - name: Cache build tooling - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.konan - key: ${{ runner.os }}-v4-${{ hashFiles('*.gradle.kts') }} - - - name: Build Main - run: ./gradlew ${{ env.MODULE }}${{ inputs.publishTask }} -PAUTO_VERSION=${{ steps.autoversion.outputs.nextVersion }} -PENABLE_PUBLISHING=true -PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} -PGITHUB_REPO=${{ github.repository }} ${{ secrets.gradle_params }} --no-daemon --stacktrace - env: - GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m" - - - uses: touchlab/autoversion-finishrelease@main - id: autoversion-finishrelease - with: - commitMessage: "KMM SPM package release for ${{ steps.autoversion.outputs.nextVersion }}" - tagMessage: "KMM release version ${{ steps.autoversion.outputs.nextVersion }}" - tagVersion: ${{ steps.autoversion.outputs.nextVersion }} - branchName: "build-${{ steps.autoversion.outputs.nextVersion }}" - - - uses: touchlab/autoversion-tagmarker@main - id: autoversion-tagmarker-cleanup - with: - nextVersion: ${{ steps.autoversion.outputs.nextVersion }} - cleanupMarkers: 'true' - - - name: Delete branch - if: (!inputs.retainBuildBranch) && (!cancelled()) - uses: touchlab/action-delete-branch@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branches: "build-${{ steps.autoversion.outputs.nextVersion }}" \ No newline at end of file diff --git a/.github/workflows/deploy-with-kmm-bridge.yml b/.github/workflows/deploy-with-kmm-bridge.yml new file mode 100644 index 0000000..f0c3247 --- /dev/null +++ b/.github/workflows/deploy-with-kmm-bridge.yml @@ -0,0 +1,20 @@ +name: Deploy WIth KMM Bridge Github Workflow + + +on: [push, pull_request] # or any other event + +# Jobs : https://github.com/touchlab/KMMBridgeGithubWorkflow/blob/main/.github/workflows/faktorybuildautoversion.yml +permissions: + contents: write + packages: write + +jobs: + call-external-workflow: + uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildautoversion.yml@main + with: + # Provide inputs here if the external workflow requires them + description: 'Deploying with KMM Bridge' # Optional + secrets: + # Provide secrets here if the external workflow requires them + netrcUsername: ${{ secrets.NETRC_USERNAME }} + netrcPassword: ${{ secrets.NETRC_PASSWORD }} \ No newline at end of file diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index cf819fb..9b30d9a 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -77,7 +77,7 @@ android { fun getVersionName(): String { - return "0.0.1-alpha" // Replace with version Name + return "0.0.2-alpha" // Replace with version Name } fun getArtifactId(): String {