tane/.forgejo/workflows/release.yml
vjrj 4d99e1a840
All checks were successful
ci / test-commons-core (push) Successful in 44s
ci / analyze (push) Successful in 1m26s
site / deploy (push) Successful in 30s
ci / test-app-seeds (push) Successful in 6m8s
ci(release): revert to F-Droid-signed recipe; drop pre-merge reference build
2026-07-19 11:19:46 +02:00

88 lines
3.2 KiB
YAML

# Release automation for git.comunes.org (Forgejo Actions).
#
# Pushing a tag `v*` builds the signed AAB and ships it to Google Play (internal
# track) via fastlane. F-Droid is NOT built here: F-Droid clones the repo and
# builds+signs it itself from the recipe in docs/fdroid/org.comunes.tane.yml
# (that build environment already handles the tesseract4android/NDK/old-repo
# dependencies). So the F-Droid and Play builds have different signatures; a
# reproducible developer-signed setup can be added later as a post-merge step.
#
# All credentials come from repo secrets (Settings > Actions > Secrets):
# TANE_KEYSTORE_BASE64 base64 of the dedicated tane-upload.jks
# TANE_KEYSTORE_PASSWORD store password
# TANE_KEY_ALIAS tane-upload
# TANE_KEY_PASSWORD key password
# SUPPLY_JSON_KEY_DATA Google Play service-account JSON
#
# NOTE: `runs-on` must match a label your Forgejo runner registered with.
name: release
on:
push:
tags:
- 'v*'
jobs:
play:
runs-on: docker
container:
image: ghcr.io/cirruslabs/flutter:3.41.9
steps:
# Manual git checkout (no Node): the flutter image has no node, so JS
# actions like actions/checkout@v4 fail with "exec: node: not found".
- name: Checkout
env:
TOKEN: ${{ github.token }}
run: |
git config --global --add safe.directory '*'
git init -q .
git remote add origin "http://x-access-token:${TOKEN}@forgejo:3000/${GITHUB_REPOSITORY}.git"
git fetch -q --depth 1 origin "${GITHUB_SHA}"
git checkout -q FETCH_HEAD
- name: Generate code (i18n + Drift)
working-directory: apps/app_seeds
run: |
flutter pub get
dart run slang
dart run build_runner build --delete-conflicting-outputs
- name: Materialize signing material from secrets
working-directory: apps/app_seeds
env:
TANE_KEYSTORE_BASE64: ${{ secrets.TANE_KEYSTORE_BASE64 }}
TANE_KEYSTORE_PASSWORD: ${{ secrets.TANE_KEYSTORE_PASSWORD }}
TANE_KEY_ALIAS: ${{ secrets.TANE_KEY_ALIAS }}
TANE_KEY_PASSWORD: ${{ secrets.TANE_KEY_PASSWORD }}
run: |
echo "$TANE_KEYSTORE_BASE64" | base64 -d > "$GITHUB_WORKSPACE/tane-upload.jks"
cat > android/key.properties <<EOF
storeFile=$GITHUB_WORKSPACE/tane-upload.jks
storePassword=$TANE_KEYSTORE_PASSWORD
keyAlias=$TANE_KEY_ALIAS
keyPassword=$TANE_KEY_PASSWORD
EOF
- name: Build signed AAB
working-directory: apps/app_seeds
run: flutter build appbundle --release
- name: Install fastlane
working-directory: apps/app_seeds
run: |
apt-get update -qq
apt-get install -y -qq ruby ruby-dev build-essential
gem install bundler --no-document
bundle install
- name: Publish to Google Play (internal track)
working-directory: apps/app_seeds
env:
SUPPLY_JSON_KEY_DATA: ${{ secrets.SUPPLY_JSON_KEY_DATA }}
run: bundle exec fastlane deploy_play
- name: Scrub signing material
if: always()
working-directory: apps/app_seeds
run: rm -f android/key.properties "$GITHUB_WORKSPACE/tane-upload.jks"