-
Notifications
You must be signed in to change notification settings - Fork 823
71 lines (60 loc) · 1.66 KB
/
release.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
name: Release Shadowrocket Rules
on:
schedule:
# 每日8时开始
- cron: '0 23 * * *'
push:
branches:
- build
paths-ignore:
- '**.md'
- 'LICENSE'
pull_request_target:
branches:
- build
paths-ignore:
- '**.md'
- 'LICENSE'
workflow_dispatch:
jobs:
Release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: build
path: build
- uses: actions/checkout@v3
with:
ref: release
path: release
- name: Install requirements
run: pip3 install -r build/requirements.txt
- name: Build Rules
run: |
cd build || exit 1
./factory/auto_build.sh
- name: Move files
run: |
cd build || exit 1
cp *.conf ../release/
cp -r figure ../release/
cp LICENSE ../release/
cp readme.md ../release/
- name: Update lazy rules
run: |
cd release || exit 1
rm lazy.conf lazy_group.conf
curl -O https://raw.githubusercontent.com/wlxuf/Shadowrocket/main/lazy.conf
curl -O https://raw.githubusercontent.com/wlxuf/Shadowrocket/main/lazy_group.conf
- name: Remove commits
run: |
cd release || exit 1
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git checkout --orphan latest_branch
git add -A
git commit -am "Nightly build"
git branch -D release
git branch -m release
git push -f origin release