mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
ci: release flow tweaks (#4723)
This commit is contained in:
parent
43f9aa0b50
commit
2e13b1ab17
4 changed files with 20 additions and 159 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue