Stamp app version into builds
ci / lint-test (push) Successful in 1m17s
ci / build (push) Successful in 2m33s

This commit is contained in:
Joe Julian
2026-04-05 23:56:58 -07:00
parent 9aeb98da58
commit 1c72a5009f
9 changed files with 55 additions and 4 deletions
+4 -1
View File
@@ -107,6 +107,7 @@ jobs:
shell: bash
run: |
set -euo pipefail
app_version="$(git describe --tags --always --dirty)"
# Gio needs a Linux ARM64 cgo cross-toolchain for desktop builds.
# Keep the CI matrix to targets this runner can build reproducibly.
for target in \
@@ -126,13 +127,15 @@ jobs:
ext=".exe"
fi
out="${DIST_DIR}/keepassgo-${goos}-${goarch}${ext}"
GOOS="${goos}" GOARCH="${goarch}" CGO_ENABLED="${cgo_enabled}" go build -o "${out}" .
GOOS="${goos}" GOARCH="${goarch}" CGO_ENABLED="${cgo_enabled}" \
go build -ldflags "-X main.appVersion=${app_version}" -o "${out}" .
done
- name: Build APK
shell: bash
run: |
set -euo pipefail
export APP_VERSION="$(git describe --tags --always --dirty)"
make apk
cp build/keepassgo.apk "${DIST_DIR}/keepassgo.apk"