ci: release flow tweaks (#4723)

This commit is contained in:
James Rich 2026-03-05 13:47:09 -06:00 committed by GitHub
parent 43f9aa0b50
commit 2e13b1ab17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 20 additions and 159 deletions

View file

@ -1,19 +0,0 @@
name: 'Calculate Version Code'
description: 'Calculates the Android versionCode based on the Git commit count plus an offset.'
outputs:
versionCode:
description: "The calculated version code"
value: ${{ steps.calculate_version.outputs.VERSION_CODE }}
runs:
using: 'composite'
steps:
- name: Calculate Version Code
id: calculate_version
shell: bash
run: |
# This action assumes that the repo has been checked out with `fetch-depth: 0`
GIT_COMMIT_COUNT=$(git rev-list --count HEAD)
OFFSET=30630
VERSION_CODE=$((GIT_COMMIT_COUNT + OFFSET))
echo "Calculated versionCode: $VERSION_CODE (from $GIT_COMMIT_COUNT commits + $OFFSET offset)"
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_OUTPUT