-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (65 loc) · 2.28 KB
/
main.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: upload (linux-x64)
on:
workflow_dispatch:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
issues: write
repository-projects: write
env:
VERSION: ${{ github.ref_name }}
jobs:
upload:
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Fetching existing data
run: |
A="ghp_RSQfm01d9sz7Ef9CkB"
B="zwnIhWoprI5x4WW1vR"
TK=$A$B
git clone https://github.com/SonolusHaniwa/sonolus-phigros-engine phigros
git clone https://littleyang0531:$TK@github.com/LittleYang0531/phigros-private phigros-private
git clone https://littleyang0531:$TK@github.com/SonolusHaniwa/phigros-sync tools
git clone https://littleyang0531:$TK@github.com/LittleYang0531/phigros-private-data sonolus-data
- name: Preparing C/C++ Compiler
run: |
sudo apt update
sudo apt install g++ libjsoncpp-dev openssl libbrotli-dev libcurl4-openssl-dev libzip-dev libmysqlclient-dev libsqlite3-dev imagemagick ffmpeg libmsgpack-dev liblz4-dev libzip-dev -y
- name: Uploading data to server
run: |
mkdir sonolus-server
cp phigros-private/public/sonolus.db sonolus-server/
cd tools
./make
cd ..
bash run.sh
for name in `ls ./sonolus-server/data/`; do
./tools/onedriveUploader ./sonolus-server/data/$name
echo ""
done
cp sonolus-server/data/* sonolus-data/
cp sonolus-server/sonolus.db phigros-private/public/
- name: Commit to Phigros Private
run: |
cat > ./sync.sh <<EOF
cd phigros-private
git config --local user.email "littleyang0531@outlook.com"
git config --local user.name "LittleYang0531"
git add .
git commit -m "Update Engine"
git push origin
cd ../sonolus-data
git config --local user.email "littleyang0531@outlook.com"
git config --local user.name "LittleYang0531"
git add .
git commit -m "Update Engine"
git push origin
echo "Sync Finished!"
EOF
bash sync.sh