-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
61 lines (55 loc) · 1.81 KB
/
master_release_sync.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
name: Sync Core and Package to Master When release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
Sync_core_to_master:
runs-on: ubuntu-latest
steps:
- name: Apt Update
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get -y install git
- name: Clone OpenClash Repository
uses: actions/checkout@v4
with:
ref: core
- name: Sync dev core to master
run: |
if [ -n "$(diff -r ./master/ ./dev/)" ]; then
rm -rf ./master/premium/*
rm -rf ./master/dev/*
rm -rf ./master/meta/*
rm -rf ./master/core_version
cp -rf "./dev/." "./master/"
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Release: Auto sync dev core"
git push
else
echo "master core already sync to dev, exit"
fi
- name: Clone OpenClash Repository
uses: actions/checkout@v4
with:
ref: package
- name: Sync dev package to master
run: |
if [ -n "$(diff -r ./master/ ./dev/)" ]; then
rm -rf ./master/README.md
rm -rf ./master/luci-app-openclash_*
rm -rf ./master/version
cp -rf "./dev/." "./master/"
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Release: Auto sync dev package"
git push
else
echo "master package already sync to dev, exit"
fi