Compare commits
3 Commits
release/an
...
release/gt
| Author | SHA1 | Date | |
|---|---|---|---|
| a852f233ee | |||
| d946e1256e | |||
| 7264cce5b8 |
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Gitea's default act_runner labels map ubuntu-22.04 to node:16-bullseye,
|
||||
# Gitea's default act_runner labels map ubuntu-latest to node:16-bullseye,
|
||||
# so keep the GitHub-hosted actions on their Node 16-compatible v3 line.
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
@@ -37,7 +37,12 @@ jobs:
|
||||
unzip -q /tmp/android-commandlinetools.zip -d /tmp/android-commandlinetools
|
||||
mv /tmp/android-commandlinetools/cmdline-tools "$ANDROID_SDK_ROOT/cmdline-tools/latest"
|
||||
|
||||
# sdkmanager exits successfully once it has consumed all input, which
|
||||
# causes `yes` to receive SIGPIPE and return 141 under `pipefail`.
|
||||
set +o pipefail
|
||||
yes | "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" --sdk_root="$ANDROID_SDK_ROOT" --licenses
|
||||
set -o pipefail
|
||||
|
||||
"$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" --sdk_root="$ANDROID_SDK_ROOT" \
|
||||
"platform-tools" \
|
||||
"build-tools;33.0.1" \
|
||||
@@ -47,12 +52,63 @@ jobs:
|
||||
working-directory: android
|
||||
run: ./gradlew assembleRelease
|
||||
|
||||
- name: Upload release artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
- name: Prepare release assets
|
||||
env:
|
||||
RELEASE_TAG: ${{ github.ref_name }}
|
||||
run: |
|
||||
set -eu
|
||||
|
||||
version="${RELEASE_TAG#release/android/}"
|
||||
if [ -z "$version" ] || [ "$version" = "$RELEASE_TAG" ]; then
|
||||
echo "Expected tag in the form release/android/{version}, got: $RELEASE_TAG" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
assets_dir="${{ gitea.workspace }}/release-assets/android"
|
||||
rm -rf "$assets_dir"
|
||||
mkdir -p "$assets_dir"
|
||||
|
||||
found_apk=0
|
||||
for apk in android/app/build/outputs/apk/release/*.apk; do
|
||||
if [ ! -e "$apk" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
found_apk=1
|
||||
base="$(basename "$apk")"
|
||||
|
||||
case "$base" in
|
||||
app-*-release*.apk)
|
||||
arch="${base#app-}"
|
||||
arch="${arch%%-release*}"
|
||||
;;
|
||||
app-release*.apk)
|
||||
arch="universal"
|
||||
;;
|
||||
*)
|
||||
echo "Unexpected APK filename: $base" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
cp "$apk" "$assets_dir/kordophone-${arch}-${version}.apk"
|
||||
done
|
||||
|
||||
if [ "$found_apk" -ne 1 ]; then
|
||||
echo "No release APKs were produced." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
{
|
||||
printf 'RELEASE_VERSION=%s\n' "$version"
|
||||
printf 'RELEASE_ASSETS_DIR=%s\n' "$assets_dir"
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Create Gitea release
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||
with:
|
||||
name: kordophone-android-release
|
||||
path: |
|
||||
android/app/build/outputs/apk/release/*.apk
|
||||
android/app/build/outputs/apk/release/output-metadata.json
|
||||
if-no-files-found: error
|
||||
retention-days: 90
|
||||
name: Kordophone Android ${{ env.RELEASE_VERSION }}
|
||||
tag_name: ${{ github.ref_name }}
|
||||
target_commitish: ${{ github.sha }}
|
||||
files: |
|
||||
${{ env.RELEASE_ASSETS_DIR }}/*.apk
|
||||
|
||||
@@ -383,6 +383,10 @@ private class TranscriptDrawingArea : Widget
|
||||
items.add(image_layout);
|
||||
}
|
||||
|
||||
// New-message animation is a one-shot effect. Clear the flag after
|
||||
// scheduling bubble animations so later relayouts do not replay it.
|
||||
message.should_animate = false;
|
||||
|
||||
last_sender = message.sender;
|
||||
last_date = date;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user