forked from upstream-mirrors/quik
Fix duplicate Matrix forwarding, contact names and bridge reset
Build and Release APK / Build APK (push) Successful in 12m11s
Build and Release APK / Build APK (push) Successful in 12m11s
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
name: Build and Sync with Upstream
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
# Run everyday at midnight to sync with upstream
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build APK
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/gradle-build-action@v2
|
||||
|
||||
- name: Sync with Upstream (if scheduled)
|
||||
if: github.event_name == 'schedule'
|
||||
run: |
|
||||
git remote add upstream https://github.com/octoshrimpy/quik.git || true
|
||||
git fetch upstream
|
||||
git config --global user.name "Gitea Actions"
|
||||
git config --global user.email "actions@gitea.local"
|
||||
git merge upstream/main --allow-unrelated-histories -m "Auto-merge upstream changes" || echo "Merge conflicts must be resolved manually"
|
||||
|
||||
- name: Build Debug APK
|
||||
run: ./gradlew assembleDebug
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: quik-matrix-sync-debug.apk
|
||||
path: presentation/build/outputs/apk/debug/presentation-debug.apk
|
||||
@@ -32,10 +32,27 @@ jobs:
|
||||
|
||||
- name: Bump Version Code for CI
|
||||
run: |
|
||||
NEW_VC=$(( 2238 + ${{ github.run_number }} ))
|
||||
NEW_VN="4.3.6-remotrix.${{ github.run_number }}"
|
||||
sed -i "s/versionCode 2238/versionCode $NEW_VC/g" presentation/build.gradle
|
||||
sed -i "s/versionName '4.3.6'/versionName '$NEW_VN'/g" presentation/build.gradle
|
||||
python3 - <<'PYTHON'
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
path = Path("presentation/build.gradle")
|
||||
source = path.read_text()
|
||||
run = int(os.environ["BUILD_NUMBER"])
|
||||
code = int(re.search(r"versionCode (\d+)", source).group(1)) + run
|
||||
base = re.search(r"versionName '([^']+)'", source).group(1)
|
||||
version = f"{base}-remotrix.{run}"
|
||||
source = re.sub(r"versionCode \d+", f"versionCode {code}", source, count=1)
|
||||
source = re.sub(r"versionName '[^']+'", f"versionName '{version}'", source, count=1)
|
||||
path.write_text(source)
|
||||
with open(os.environ["GITHUB_ENV"], "a") as env:
|
||||
env.write(f"APP_VERSION={version}\n")
|
||||
PYTHON
|
||||
env:
|
||||
BUILD_NUMBER: ${{ github.run_number }}
|
||||
|
||||
- name: Test Matrix room resolution
|
||||
run: ./gradlew :remotrix-sync:testDebugUnitTest
|
||||
|
||||
- name: Build Debug APK
|
||||
run: |
|
||||
@@ -54,7 +71,7 @@ jobs:
|
||||
- name: Create Release
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||
with:
|
||||
tag_name: "v4.3.6-remotrix.${{ github.run_number }}"
|
||||
tag_name: "v${{ env.APP_VERSION }}"
|
||||
name: "Remotrix Build #${{ github.run_number }}"
|
||||
body: "Automated release of Quik Fork with Remotrix integration. Generated from the latest push."
|
||||
files: |
|
||||
|
||||
@@ -13,6 +13,7 @@ jobs:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -23,12 +24,11 @@ jobs:
|
||||
|
||||
- name: Fetch and Merge Upstream
|
||||
run: |
|
||||
git remote add upstream https://gitea.labus.uk/upstream-mirrors/quik.git
|
||||
git fetch upstream
|
||||
git fetch https://gitea.labus.uk/upstream-mirrors/quik.git master
|
||||
# Try to merge upstream master into our master branch.
|
||||
# If it fails, the step exits with a non-zero code.
|
||||
git merge upstream/master --no-edit
|
||||
git push origin master
|
||||
git merge FETCH_HEAD --no-edit
|
||||
git push origin HEAD:master
|
||||
|
||||
- name: Notify on Failure
|
||||
if: failure()
|
||||
|
||||
Reference in New Issue
Block a user