From cec504eff24382ea3a03a20ded5a967c1d25a8ec Mon Sep 17 00:00:00 2001 From: Erik Eelde Date: Fri, 12 Jan 2024 00:30:44 +0100 Subject: [PATCH] Fix release --- .../{ => actions}/version_information/action.yml | 0 .github/workflows/app-release.yml | 14 ++++++++++---- scripts/generate_versions.sh | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) rename .github/{ => actions}/version_information/action.yml (100%) diff --git a/.github/version_information/action.yml b/.github/actions/version_information/action.yml similarity index 100% rename from .github/version_information/action.yml rename to .github/actions/version_information/action.yml diff --git a/.github/workflows/app-release.yml b/.github/workflows/app-release.yml index 099ae533..07973b49 100644 --- a/.github/workflows/app-release.yml +++ b/.github/workflows/app-release.yml @@ -28,6 +28,9 @@ jobs: echo "${{ secrets.SERVICE_ACCOUNT }}" > service_account.json.asc gpg -d --passphrase "${{ secrets.GPG_ENCRYPTION_KEY }}" --batch service_account.json.asc > service_account.json + - name: "Calculate build number" + id: version_information + uses: ./.github/actions/version_information - name: Check out java uses: actions/setup-java@v4 @@ -35,10 +38,6 @@ jobs: distribution: 'adopt' java-version: 17 - - name: "Calculate build number" - id: version_information - uses: ./.github/actions/version_information - - name: Copy CI gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties @@ -51,3 +50,10 @@ jobs: - name: Publish application if: github.repository == 'erikeelde/toggles' run: ./gradlew :toggles-app:publishReleaseBundle + + - name: Upload binaries + uses: actions/upload-artifact@v4 + with: + name: Apks + path: '**/build/outputs/*' + retention-days: 14 diff --git a/scripts/generate_versions.sh b/scripts/generate_versions.sh index 30c25516..d1ec3fec 100755 --- a/scripts/generate_versions.sh +++ b/scripts/generate_versions.sh @@ -29,7 +29,7 @@ for prefix in "${prefixes[@]}"; do patch="${version_parts[2]}" # Calculate the version code using arithmetic expansion - version_code=$((major * 100000 + minor * 1000 + patch * 10)) + version_code=$((major * 1000000 + minor * 1000 + patch * 10)) # Get the number of commits since the tag commit_count=$(git rev-list --count "${tag}"..HEAD)