diff --git a/.github/actions/create-release-number/action.yml b/.github/actions/create-release-number/action.yml index 7d1aff3a..f88c997c 100644 --- a/.github/actions/create-release-number/action.yml +++ b/.github/actions/create-release-number/action.yml @@ -21,9 +21,7 @@ runs: run: | COMMITS=`git rev-list --count HEAD` TAGS=`git tag | grep -v beta | wc -l` - # Because for a while we were increasing by 2 rather than one we need an offset - OFFSET=15 - VC=$((COMMITS+TAGS+OFFSET)) + VC=$(((COMMITS+TAGS) << 1)) HASH=`git rev-parse --short HEAD` if [ "${{inputs.beta}}" = "true" ]; then VERSION=beta-$VC-$HASH diff --git a/.github/workflows/weekly.yaml b/.github/workflows/weekly.yaml index 86c858a9..0d8a7e2c 100644 --- a/.github/workflows/weekly.yaml +++ b/.github/workflows/weekly.yaml @@ -75,4 +75,4 @@ jobs: KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }} VERSION: ${{ steps.rel_number.outputs.version }} VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} - run: ./gradlew publishFullReleaseBundle || echo "Issue uploading Release, may just be nothing has changed" + run: ./gradlew :app:publishFullReleaseBundle :wear:publishReleaseBundle || echo "Issue uploading Release, may just be nothing has changed" diff --git a/wear/build.gradle.kts b/wear/build.gradle.kts index 954b4275..c18cf5f4 100644 --- a/wear/build.gradle.kts +++ b/wear/build.gradle.kts @@ -2,6 +2,7 @@ plugins { id("com.android.application") id("kotlin-android") id("kotlin-kapt") + id("com.github.triplet.play") } android { @@ -13,7 +14,8 @@ android { targetSdk = 30 versionName = System.getenv("VERSION") ?: "LOCAL" - versionCode = System.getenv("VERSION_CODE")?.toIntOrNull() ?: 1 + // We add 1 because the app and wear versions need to have different version codes. + versionCode = (System.getenv("VERSION_CODE")?.toIntOrNull() ?: 1) + 1 javaCompileOptions { annotationProcessorOptions { @@ -62,6 +64,12 @@ android { } } +play { + serviceAccountCredentials.set(file("playStorePublishServiceCredentialsFile.json")) + track.set("beta") + resolutionStrategy.set(com.github.triplet.gradle.androidpublisher.ResolutionStrategy.IGNORE) +} + dependencies { implementation(project(":common"))