Release — F-Droid repo + Gitea/Codeberg release + Play / detect (push) Successful in 8s
Release — F-Droid repo + Gitea/Codeberg release + Play / release (push) Skipped
Release — F-Droid repo + Gitea/Codeberg release + Play / play (push) Skipped
Renovate / renovate (push) Successful in 1m34s
Moves Gradle jobs to the dedicated `gradle` runner (capacity 1, 8g per job) and the cheap gate/lint jobs to `light`. Two runners used to share the `docker` label, so two Gradle builds could run at once and the VPS ran out of memory. Only `runs-on` lines change. Co-authored-by: Jean-Luc Makiola <business@jeanlucmakiola.de> Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/385
98 lines
3.1 KiB
YAML
98 lines
3.1 KiB
YAML
name: Beta — Codeberg pre-release
|
|
|
|
# Pushing a release/* branch whose versionName is X.Y.Z-beta.N publishes a
|
|
# Codeberg pre-release (APK + SHA-256) and a Gitea pre-release (R8 mapping).
|
|
# Betas never reach F-Droid or Play. See docs/RELEASING.md.
|
|
on:
|
|
push:
|
|
branches: ['release/**']
|
|
|
|
concurrency:
|
|
group: beta
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
detect:
|
|
# Gitea only; see the same guard in release.yaml.
|
|
if: github.repository_owner == 'makiolaj'
|
|
runs-on: light
|
|
outputs:
|
|
is_beta: ${{ steps.v.outputs.is_beta }}
|
|
version: ${{ steps.v.outputs.version }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Resolve version and whether it still needs publishing
|
|
id: v
|
|
run: |
|
|
set -e
|
|
INFO=$(bash scripts/version_info.sh)
|
|
echo "$INFO"
|
|
echo "$INFO" >> "$GITHUB_OUTPUT"
|
|
if [ "$(bash scripts/version_info.sh channel)" != beta ]; then
|
|
echo "Not a beta — nothing to do."
|
|
echo "is_beta=false" >> "$GITHUB_OUTPUT"
|
|
exit 0
|
|
fi
|
|
GATE=$(bash scripts/release_gate.sh)
|
|
echo "is_beta=${GATE#cut=}" >> "$GITHUB_OUTPUT"
|
|
|
|
beta:
|
|
needs: detect
|
|
if: needs.detect.outputs.is_beta == 'true'
|
|
runs-on: gradle
|
|
env:
|
|
ANDROID_HOME: /opt/android-sdk
|
|
ANDROID_SDK_ROOT: /opt/android-sdk
|
|
VERSION: ${{ needs.detect.outputs.version }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Android build environment
|
|
uses: ./.gitea/actions/android-env
|
|
|
|
- name: Pin versionCode to versionName
|
|
run: bash scripts/version_info.sh --pin
|
|
|
|
- name: Unit tests
|
|
run: ./gradlew testDebugUnitTest
|
|
|
|
# The real app key, so a beta updates in place to later betas and stable.
|
|
- name: Setup Android Keystore
|
|
env:
|
|
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
|
|
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
|
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
|
run: bash scripts/write_keystore.sh
|
|
|
|
- name: Build release APK
|
|
run: ./gradlew assembleRelease
|
|
|
|
- name: Create tag + Gitea pre-release
|
|
env:
|
|
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
|
|
SHA: ${{ github.sha }}
|
|
run: |
|
|
set -e
|
|
bash scripts/release_notes.sh "$VERSION" > release-notes.md
|
|
cat release-notes.md
|
|
TAG="v$VERSION" PRERELEASE=true NOTES_FILE=release-notes.md \
|
|
MAPPING=app/build/outputs/mapping/release/mapping.txt \
|
|
bash scripts/publish_gitea_release.sh
|
|
|
|
- name: Publish pre-release to Codeberg
|
|
env:
|
|
TOKEN: ${{ secrets.CODEBERG_RELEASE_TOKEN }}
|
|
API: https://codeberg.org/api/v1/repos/jlmakiola/calendula
|
|
SHA: ${{ github.sha }}
|
|
run: |
|
|
set -e
|
|
TAG="v$VERSION" PRERELEASE=true NOTES_FILE=release-notes.md \
|
|
APK=app/build/outputs/apk/release/app-release.apk \
|
|
bash scripts/publish_codeberg_release.sh
|