复活吧 GitLab

This commit is contained in:
n3t1zen
2026-05-05 18:08:14 +08:00
parent 1cd46d17cf
commit 7929b5711d
3 changed files with 41 additions and 7 deletions
+40
View File
@@ -0,0 +1,40 @@
build-android:
image: golang:1.26.2-bookworm
before_script: |
apt update && apt install -y openjdk-17-jdk-headless unzip curl rsync patch
/usr/lib/jvm/java-17-openjdk-amd64/bin/java --version
mkdir -p ~/.ssh && ssh-keyscan -p 22 -t rsa,ed25519 git.inker.bot >> ~/.ssh/known_hosts
cache:
- paths:
- $HOME/.gradle
- $HOME/go
- clients/android/app/build
script: |
export version="$(git describe --tags)-$CI_COMMIT_SHORT_SHA" && echo "building version $version"
bash ./setup-ndk.sh
bin/update && bin/apply-ci && cd works/core
git submodule update --init --recursive
git tag v$version -f
make lib_install
export PATH="$PATH:$(go env GOPATH)/bin"
go mod tidy
make lib_android
cd clients/android && git checkout dev && cd ../..
go run -v ./cmd/internal/update_android_version --ci --nightly
mkdir clients/android/app/libs # start building
cp *.aar clients/android/app/libs
cd clients/android
echo "Gonna build with ANDROID_HOME=$ANDROID_HOME"
ANDROID_HOME="$HOME/Android/Sdk" ./gradlew --no-daemon :app:assembleOtherRelease :app:assembleOtherLegacyRelease
cd ../..
mkdir -p dist # prepare upload
cp clients/android/app/build/outputs/apk/other/release/*.apk dist
cp clients/android/app/build/outputs/apk/otherLegacy/release/*.apk dist
VERSION_CODE=$(grep VERSION_CODE clients/android/version.properties | cut -d= -f2)
VERSION_NAME=$(grep VERSION_NAME clients/android/version.properties | cut -d= -f2)
variables:
ANDROID_NDK_VERSION: r28
LOCAL_PROPERTIES: "S0VZU1RPUkVfUEFTUz0xMTQ1MTQKQUxJQVNfTkFNRT1hbGlhcwpBTElBU19QQVNTPTExNDUxNAo="
artifacts:
paths:
- "./dist"
-6
View File
@@ -12,12 +12,6 @@ REV_FILE="$ROOT/works/rev"
REPO_URL="git@git.inker.bot:arknights/sing-box.git"
UPSTREAM_BRANCH="main"
if [ ! -z "$CI_JOB_TOKEN" ]; then
git config --global user.name imabot
git config --global user.email ci@inker.bot
git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@git.inker.bot/".insteadOf "git@git.inker.bot:"
fi
CONFIG="$ROOT/works/config"
if [ -f "$CONFIG" ]; then
. "$CONFIG"
+1 -1
View File
@@ -1 +1 @@
371d7355e8c3badc1fc3c3a81dd11037c9f3b29d
adf0a75e5f7b38f16e67be999eb52a8d7b5e0e63