Merge pull request #12 from SonolusHaniwa/develop #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-sirius-engine sirius | |
git clone https://littleyang0531:$TK@github.com/LittleYang0531/world-dai-star-private wds | |
git clone https://littleyang0531:$TK@github.com/SonolusHaniwa/sirius-sync tools | |
git clone https://littleyang0531:$TK@github.com/LittleYang0531/world-best-star-private wbs | |
git clone https://littleyang0531:$TK@github.com/SonolusHaniwa/stellarity stellarity | |
- 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 wds/sonolus.db sonolus-server/ | |
cd tools | |
./make | |
cp exportor ../sonolus-server/ | |
cd .. | |
bash run.sh | |
for name in `ls ./sonolus-server/data/`; do | |
./tools/onedriveUploader ./sonolus-server/data/$name | |
echo "" | |
done | |
cp sonolus-server/data.json wds/ | |
cp sonolus-server/sonolus.db wds/ | |
cp sonolus-server/engine.json wbs/backend/ | |
cp sonolus-server/engine.json stellarity/backend/ | |
- name: Commit to World Dai Star Private | |
run: | | |
cat > ./sync.sh <<EOF | |
cd wds | |
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 ../wbs | |
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 ../stellarity | |
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 |