-
Notifications
You must be signed in to change notification settings - Fork 44
56 lines (49 loc) · 1.59 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Build
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v4
- name: Copy Files
run: |
mkdir -p build_assets
cp -r ${GITHUB_WORKSPACE}/META-INF/ ./build_assets/
cp -r ${GITHUB_WORKSPACE}/webroot/ ./build_assets/
cp -r ${GITHUB_WORKSPACE}/xray/ ./build_assets/
cp ${GITHUB_WORKSPACE}/xray4magisk_service.sh ./build_assets/
cp ${GITHUB_WORKSPACE}/customize.sh ./build_assets/
cp ${GITHUB_WORKSPACE}/module.prop ./build_assets/
cp ${GITHUB_WORKSPACE}/uninstall.sh ./build_assets/
cp ${GITHUB_WORKSPACE}/update.json ./build_assets/
cp ${GITHUB_WORKSPACE}/README.md ./build_assets/
cp ${GITHUB_WORKSPACE}/README_zh_CN.md ./build_assets/
- name: Create ZIP archive
shell: bash
run: |
pushd build_assets || exit 1
touch -mt $(date +%Y01010000) *
zip -9vr ../Xray4Magisk.zip .
popd || exit 1
FILE=./Xray4Magisk.zip
DGST=$FILE.dgst
for METHOD in {"md5","sha1","sha256","sha512"}
do
openssl dgst -$METHOD $FILE | sed 's/([^)]*)//g' >>$DGST
done
- name: Change the name
run: |
mv build_assets Xray4Magisk
- name: Upload files to Artifacts
uses: actions/upload-artifact@v4
with:
name: Xray4Magisk
path: |
./Xray4Magisk/*