Update channels - ci.yml now publishes each green push to dev as a prerelease tagged v1.0.<n>-dev, so the dev channel has something to install. Workflow artifacts could not serve this: downloading one needs authentication, which the app does not have. - Prereleases specifically, because GitHub's "latest release" endpoint skips them — a production install can never be handed a dev build. Pull requests build and check but never publish. - Settings gains a channel picker. The two channels are numbered by separate workflow run counters, so versions are only compared within a channel; the app reads the -dev suffix in its own versionName to know where it stands, and treats a channel change as an explicit switch. The screen warns that such a switch can be a downgrade Android will refuse. - PLG_RELEASE becomes PLG_CHANNEL, naming the channel rather than a flag. Euchre - Cards in a trick now sit on the side of the table belonging to whoever played them, rotated to face them, labelled You / Left / Partner / Right. Previously they were a flat row tagged with seat numbers, which made it hard to tell who had played what. - Bidding says what it will actually do. As dealer the button reads "Pick it up" rather than "Order up", since the turn card comes to your hand, and a line of explanatory text spells out the consequence either way. Sequence - Playable squares get a much heavier outline, scaled off cell size and in a fixed amber that reads against a white card, a green corner and a chip alike. The old 2dp theme-coloured border was hard to see. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015qjfMiPUDshdKEUa6vxqzN
111 lines
3.8 KiB
YAML
111 lines
3.8 KiB
YAML
name: CI
|
|
|
|
# Pre-merge checks. Runs on the dev branch and on every pull request aimed at
|
|
# dev or main, so breakage is caught before it reaches main and triggers a
|
|
# release.
|
|
#
|
|
# On a push to dev it also publishes the build as a dev-channel prerelease, so
|
|
# the in-app updater can offer it to anyone who has switched to that channel.
|
|
# Prereleases are used deliberately: GitHub's "latest release" endpoint skips
|
|
# them, so a production-channel user never sees a dev build. Pull requests only
|
|
# build and check — they never publish, which keeps a PR from a fork from
|
|
# shipping anything.
|
|
on:
|
|
push:
|
|
branches: [ dev ]
|
|
pull_request:
|
|
branches: [ main, dev ]
|
|
workflow_dispatch:
|
|
|
|
# Needed to publish the dev-channel prerelease below.
|
|
permissions:
|
|
contents: write
|
|
|
|
# A newer push to the same branch or PR makes the in-flight run obsolete.
|
|
concurrency:
|
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and check
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
# Stamp the APK as a dev-channel build only when this is a real push to
|
|
# dev. Pull request builds stay unstamped at 1.0.0-dev, since they are
|
|
# never published and must not claim a channel version.
|
|
PLG_CHANNEL: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/dev') && 'dev' || '' }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: '17'
|
|
cache: gradle
|
|
|
|
- name: Set up Android SDK
|
|
uses: android-actions/setup-android@v3
|
|
|
|
- name: Build debug APK
|
|
run: ./gradlew assembleDebug --no-daemon
|
|
|
|
- name: Run unit tests
|
|
run: ./gradlew testDebugUnitTest --no-daemon
|
|
|
|
- name: Run Android lint
|
|
run: ./gradlew lintDebug --no-daemon
|
|
|
|
- name: Upload debug APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ProLibertateGames-debug-apk
|
|
path: app/build/outputs/apk/debug/app-debug.apk
|
|
if-no-files-found: error
|
|
retention-days: 14
|
|
|
|
- name: Upload lint and test reports
|
|
# Reports are most useful precisely when a step above failed.
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ProLibertateGames-reports
|
|
path: |
|
|
app/build/reports/
|
|
if-no-files-found: ignore
|
|
retention-days: 14
|
|
|
|
# Everything below publishes the dev channel, and only ever from a push
|
|
# to dev that has already built, tested and linted clean above.
|
|
- name: Stage dev APK
|
|
id: stage
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
|
|
run: |
|
|
set -euo pipefail
|
|
version="v1.0.${{ github.run_number }}-dev"
|
|
src="app/build/outputs/apk/debug/app-debug.apk"
|
|
dest="ProLibertateGames-${version}.apk"
|
|
cp "$src" "$dest"
|
|
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
echo "apk=$dest" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Publish dev channel prerelease
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
set -euo pipefail
|
|
gh release create "${{ steps.stage.outputs.version }}" \
|
|
"${{ steps.stage.outputs.apk }}" \
|
|
--repo "${{ github.repository }}" \
|
|
--target "${{ github.sha }}" \
|
|
--title "ProLibertateGames ${{ steps.stage.outputs.version }}" \
|
|
--prerelease \
|
|
--notes "Automated **dev channel** build from \`${{ github.sha }}\` on \`dev\`.
|
|
|
|
Preview build: newer than production, and less tested. Switch to the
|
|
Dev update channel in Settings to be offered these. Marked as a
|
|
prerelease so production-channel installs never see it."
|