Skip to content

Commit b3f2bd6

Browse files
committed
ci: add build workflow for Test2
1 parent a4b52ac commit b3f2bd6

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build Vector Test2
2+
3+
on:
4+
push:
5+
branches: ["Test2"]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 45
16+
env:
17+
HAS_PERSISTENT_SIGNING_KEY: ${{ secrets.VECTOR_KEYSTORE_BASE64 != '' }}
18+
steps:
19+
- name: Check out source and submodules
20+
uses: actions/checkout@v7
21+
with:
22+
submodules: recursive
23+
fetch-depth: 0
24+
25+
- name: Set up Java
26+
uses: actions/setup-java@v5
27+
with:
28+
distribution: temurin
29+
java-version: "21"
30+
31+
- name: Set up Android SDK
32+
uses: android-actions/setup-android@v4
33+
34+
- name: Set up Gradle
35+
uses: gradle/actions/setup-gradle@v6
36+
37+
- name: Create CI signing key
38+
if: env.HAS_PERSISTENT_SIGNING_KEY != 'true'
39+
run: |
40+
keytool -genkeypair -v \
41+
-keystore "$RUNNER_TEMP/vector-ci.jks" \
42+
-storetype JKS \
43+
-storepass vector-ci-store \
44+
-keypass vector-ci-key \
45+
-alias vector-ci \
46+
-keyalg RSA \
47+
-keysize 2048 \
48+
-validity 10000 \
49+
-dname "CN=Vector CI, OU=Build, O=Vector, L=CI, ST=CI, C=US"
50+
51+
- name: Restore persistent signing key
52+
if: env.HAS_PERSISTENT_SIGNING_KEY == 'true'
53+
env:
54+
VECTOR_KEYSTORE_BASE64: ${{ secrets.VECTOR_KEYSTORE_BASE64 }}
55+
run: |
56+
printf '%s' "$VECTOR_KEYSTORE_BASE64" | base64 --decode > "$RUNNER_TEMP/vector-ci.jks"
57+
58+
- name: Build signed release module
59+
env:
60+
ANDROID_STORE_FILE: ${{ runner.temp }}/vector-ci.jks
61+
ANDROID_STORE_PASSWORD: ${{ secrets.VECTOR_KEYSTORE_PASSWORD || 'vector-ci-store' }}
62+
ANDROID_KEY_PASSWORD: ${{ secrets.VECTOR_KEY_PASSWORD || 'vector-ci-key' }}
63+
ANDROID_KEY_ALIAS: ${{ secrets.VECTOR_KEY_ALIAS || 'vector-ci' }}
64+
VECTOR_BUILD_REPOSITORY: ${{ github.repository }}
65+
VECTOR_BUILD_COMMIT: ${{ github.sha }}
66+
run: |
67+
printf '%s\n' \
68+
"androidStoreFile=$ANDROID_STORE_FILE" \
69+
"androidStorePassword=$ANDROID_STORE_PASSWORD" \
70+
"androidKeyPassword=$ANDROID_KEY_PASSWORD" \
71+
"androidKeyAlias=$ANDROID_KEY_ALIAS" >> gradle.properties
72+
./gradlew zipAll --no-daemon --stacktrace
73+
74+
- name: Upload Vector module
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: vector-release
78+
path: zygisk/build/**/*.zip
79+
if-no-files-found: error

0 commit comments

Comments
 (0)