Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions .github/workflows/release-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,19 @@ jobs:
make setup
make patch-node-modules

# Derive versionName from the pushed tag (v1.1.14, v1.1.14-rc1, ...).
- name: Determine version from tag
id: version
run: |
VERSION="${GITHUB_REF#refs/tags/v}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Build release APK (${{ matrix.abi }})
run: |
make release-android \
ANDROID_TARGETS=${{ matrix.gomobile_target }} \
ANDROID_ABI=${{ matrix.abi }}
ANDROID_ABI=${{ matrix.abi }} \
VERSION_NAME=${{ steps.version.outputs.version }}
env:
RELEASE_KEYSTORE_PATH: /tmp/release.keystore
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
Expand Down Expand Up @@ -206,11 +214,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Read version from VERSION file
- name: Determine version from tag
id: version
run: |
VERSION=$(cat VERSION | tr -d '[:space:]')
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
VERSION="${GITHUB_REF#refs/tags/v}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
if [[ "$VERSION" == *-rc* ]]; then
echo "is_rc=true" >> "$GITHUB_OUTPUT"
else
echo "is_rc=false" >> "$GITHUB_OUTPUT"
fi

- name: Download all APKs
uses: actions/download-artifact@v4
Expand All @@ -237,7 +250,11 @@ jobs:
arm64-v8a versionCode (for F-Droid reproducible-build metadata):
`${{ steps.stage.outputs.versioncode }}`
append_body: true
draft: true
# RCs auto-publish as prereleases so F-Droid CI can pull them without
# waiting on a manual button click. Final releases stay draft so a
# human eyeballs the artifacts before they go public.
draft: ${{ steps.version.outputs.is_rc != 'true' }}
prerelease: ${{ steps.version.outputs.is_rc == 'true' }}
generate_release_notes: true
files: |
apks/syncup-*.apk
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ IOS_APP = mobile-app/ios/build/Build/Products/Release-iphonesimulator/syncup.app
ANDROID_PACKAGE = com.siddarthkay.syncup
ANDROID_APK = mobile-app/android/app/build/outputs/apk/release/app-release.apk

# VERSION_NAME defaults to the VERSION file but can be overridden on the CLI,
# e.g. for release-candidate tags where the tag (v1.1.14-rc1) carries the
# version but the committed VERSION file still points at the last shipped
# release. CI passes this explicitly when building from a tag.
VERSION_NAME ?= $(shell cat VERSION 2>/dev/null | tr -d '[:space:]')

setup:
@$(MAKE) -C backend setup
@$(MAKE) -C mobile-app install
Expand All @@ -56,14 +62,14 @@ patch-node-modules:
release-android:
@$(MAKE) -C backend android $(if $(ANDROID_TARGETS),ANDROID_TARGETS=$(ANDROID_TARGETS))
@$(MAKE) -C mobile-app release-android \
VERSION_NAME=$(shell cat VERSION 2>/dev/null | tr -d '[:space:]') \
VERSION_NAME=$(VERSION_NAME) \
ANDROID_ABI=$(ANDROID_ABI)

# PR Android build: .pr applicationId suffix, release-signed.
pr-android:
@$(MAKE) -C backend android
@$(MAKE) -C mobile-app pr-android \
VERSION_NAME=$(shell cat VERSION 2>/dev/null | tr -d '[:space:]')
VERSION_NAME=$(VERSION_NAME)

# One-shot: create + push certs/profiles to the match repo. Run this once,
# on your Mac, after filling in .env.fastlane. Idempotent.
Expand Down
Loading