Skip to content

Commit

Permalink
Release Android 2.2.0
Browse files Browse the repository at this point in the history
Release Android 2.2.0
  • Loading branch information
dev-Fabi committed May 19, 2024
2 parents 72b1ee9 + f5ac2ef commit 64056be
Show file tree
Hide file tree
Showing 164 changed files with 5,722 additions and 2,074 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/checkStyle.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Check Style

concurrency: # Cancel currently running style checks when a new one is started
group: style-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:

Expand All @@ -11,19 +13,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Setup JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3

- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand All @@ -32,8 +34,8 @@ jobs:
run: ./gradlew detekt

- name: Upload detekt SARIF files
if: always()
uses: github/codeql-action/upload-sarif@v2
if: success() || failure()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'build/reports/detekt/merge.sarif'
category: detekt
85 changes: 85 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Publish
concurrency: # Cancel currently running releases when a new one is started
group: publish-${{ github.ref_name }}
cancel-in-progress: true

on:
workflow_dispatch:
branches:
- develop
- main
inputs:
androidOnly:
type: boolean
description: Release android only
default: false
push:
branches:
- develop
- main
paths:
- 'androidApp/**'
- '!androidApp/version.properties'
- 'shared/**'
- 'buildSrc/**'
- 'build.gradle.kts'
- 'gradle.properties'
- 'settings.gradle.kts'
- 'gradle/**'

jobs:
changes:
name: Identify changed modules
runs-on: ubuntu-latest
outputs:
android: ${{ steps.changes.outputs.android }}
shared: ${{ steps.changes.outputs.shared }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check changes
uses: dorny/paths-filter@v3
id: changes
with:
base: ${{ github.ref }}
filters: |
android:
- 'androidApp/**'
shared:
- 'shared/**'
- 'buildSrc/**'
- 'build.gradle.kts'
- 'gradle.properties'
- 'settings.gradle.kts'
- 'gradle/**'
release-shared:
name: Release shared
permissions:
contents: write
packages: write
needs: changes
if: ${{ (github.event_name != 'workflow_dispatch' && needs.changes.outputs.shared == 'true') || (github.event_name == 'workflow_dispatch' && !github.event.inputs.androidOnly) }}
uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildautoversion.yml@v1.1
with:
jvmVersion: 17
versionBaseProperty: SHARED_BASE_VERSION
# kmmBridgePublish = xcFramework, publishAndroidReleasePublicationToGitHubPackagesRepository = Android lib
publishTask: kmmBridgePublish publishAndroidReleasePublicationToGitHubPackagesRepository
secrets:
gradle_params: "-PGITHUB_BRANCH=${{ github.ref_name }}"


android-after-shared:
name: Release Android
needs: release-shared
uses: ./.github/workflows/publishAndroid.yml
secrets: inherit

android-only:
name: Release Android only
needs: changes
if: ${{ (needs.changes.outputs.android == 'true' && needs.changes.outputs.shared == 'false') || (github.event_name == 'workflow_dispatch' && github.event.inputs.androidOnly) }}
uses: ./.github/workflows/publishAndroid.yml
secrets: inherit
56 changes: 31 additions & 25 deletions .github/workflows/publishAndroid.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,29 @@
name: Publish Android
concurrency: # Cancel currently running releases when a new one is started
group: publish-android-${{ github.ref_name }}
cancel-in-progress: true

on:
push:
branches:
- main
- develop
paths:
- 'androidApp/**'
- 'shared/**'
- 'buildSrc/**'
- 'build.gradle.kts'
- 'gradle.properties'
- 'settings.gradle.kts'
workflow_call:

jobs:
publish:
publish-android:
concurrency:
group: publish-android-${{ github.ref_name }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3

- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand All @@ -47,20 +38,35 @@ jobs:
- name: Release Android
if: ${{ github.ref_name == 'main' }}
run: ./gradlew publishProdReleaseApps --no-daemon -PkeyPassword=${{ secrets.KEY_PASSWORD }} -PstorePassword=${{ secrets.STORE_PASSWORD }}
run: ./gradlew publishProdReleaseApps --no-daemon -PkeyPassword=${{ secrets.KEY_PASSWORD }} -PstorePassword=${{ secrets.STORE_PASSWORD }} -PremoteBuild=true -PGITHUB_PACKAGES_USERNAME=cirunner -PGITHUB_PACKAGES_PASSWORD=${{ secrets.GITHUB_TOKEN }}
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3g"

- name: Release Android Lava
if: ${{ github.ref_name == 'develop' }}
run: ./gradlew publishLavaReleaseApps --no-daemon -PkeyPassword=${{ secrets.KEY_PASSWORD }} -PstorePassword=${{ secrets.STORE_PASSWORD }}
if: ${{ github.ref_name != 'main' }}
run: ./gradlew publishLavaReleaseApps --no-daemon -PkeyPassword=${{ secrets.KEY_PASSWORD }} -PstorePassword=${{ secrets.STORE_PASSWORD }} -PremoteBuild=true -PGITHUB_PACKAGES_USERNAME=cirunner -PGITHUB_PACKAGES_PASSWORD=${{ secrets.GITHUB_TOKEN }}
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3g"

- name: Create version tag
- name: Add version to env
run: |
ANDROID_VERSION=$(cat androidApp/build/version.tag)
echo "ANDROID_VERSION=${ANDROID_VERSION}" >> $GITHUB_ENV
echo "VERSION_TAG=android/${ANDROID_VERSION}" >> $GITHUB_ENV
- name: Create version tag ${{ env.VERSION_TAG }}
run: |
git tag android-$(cat androidApp/build/version.tag)
git push origin android-$(cat androidApp/build/version.tag)
git tag ${{ env.VERSION_TAG }}
git push origin ${{ env.VERSION_TAG }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: Android ${{ env.ANDROID_VERSION }}
tag_name: ${{ env.VERSION_TAG }}
prerelease: ${{ github.ref_name != 'main' }}
generate_release_notes: true


# TODO auto increase androidPatch in version.properties (on prod build only) and push (to dev branch, republish must be prevented then)?

Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/publishShared.yml

This file was deleted.

27 changes: 18 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
name: Test
concurrency: # Cancel currently running tests when a new one is started
group: test-${{ github.ref }}
cancel-in-progress: true
on:
push:
# Push to develop and main branches trigger a release -> tests are run anyway
branches-ignore:
- 'develop'
- 'main'
- 'build-**' # temporary build branch for kmmbridge

paths:
- 'androidApp/**'
- '!androidApp/version.properties'
- 'shared/**'
- 'buildSrc/**'
- 'gradle/**'
- 'build.gradle.kts'
- 'gradle.properties'
- 'settings.gradle.kts'
- '.github/workflows/test.yml'

jobs:
test:
runs-on: macos-latest # use mac so that shared iOS targets can also be built
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3

- name: Cache kotlin native build tooling
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "~/.konan"
key: ${{ runner.os }}-v4-${{ hashFiles('*.gradle.kts') }}
Expand Down
Loading

0 comments on commit 64056be

Please sign in to comment.