From 091cd2e028c8819387dfe15402f352daa0fc717d Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Sat, 20 Jan 2024 20:57:39 -0500 Subject: [PATCH] fix: ci versionCode --- .github/workflows/pre-release.yml | 3 ++- .github/workflows/release.yml | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 8fce468..3d633c5 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -2,6 +2,7 @@ name: Android CI Tag Deployment (Pre-release) on: + workflow_dispatch: push: tags: - '*.*.*-**' @@ -54,7 +55,7 @@ jobs: run: echo "path=$(find . -regex '^.*/build/outputs/apk/fdroid/release/.*\.apk$' -type f | head -1)" >> $GITHUB_OUTPUT - name: Get version code run: | - version_code=$(grep "VERSION_CODE" buildSrc/src/main/kotlin/Constants.kt | awk '{print $2}' | tr -d '\n') + version_code=$(grep "VERSION_CODE" buildSrc/src/main/kotlin/Constants.kt | awk '{print $5}' | tr -d '\n') echo "VERSION_CODE=$version_code" >> $GITHUB_ENV # Save the APK after the Build job is complete to publish it as a Github release in the next job - name: Upload APK diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 84777a1..54ecf20 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,9 +2,11 @@ name: Android CI Tag Deployment (Release) on: + workflow_dispatch: push: tags: - '*.*.*' + - '!*.*.*-**' jobs: build: @@ -54,7 +56,7 @@ jobs: run: echo "path=$(find . -regex '^.*/build/outputs/apk/fdroid/release/.*\.apk$' -type f | head -1)" >> $GITHUB_OUTPUT - name: Get version code run: | - version_code=$(grep "VERSION_CODE" buildSrc/src/main/kotlin/Constants.kt | awk '{print $2}' | tr -d '\n') + version_code=$(grep "VERSION_CODE" buildSrc/src/main/kotlin/Constants.kt | awk '{print $5}' | tr -d '\n') echo "VERSION_CODE=$version_code" >> $GITHUB_ENV # Save the APK after the Build job is complete to publish it as a Github release in the next job - name: Upload APK