-
Notifications
You must be signed in to change notification settings - Fork 302
123 lines (113 loc) · 3.53 KB
/
release.yaml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: JS爬虫发布
on:
push:
tags:
- jsV[0-9]+.*
jobs:
build:
name: TVSpider
runs-on: ubuntu-latest # 如果是镜像中启动无法获取git信息
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ] #, "macos-latest", "windows-latest"
steps:
- name: 下载代码
uses: actions/checkout@v3
with:
repository: jadehh/TVSpider
fetch-depth: 0 # 显示所有提交的日志
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
- name: 下载需要打包更新的代码
uses: actions/checkout@v3
with:
repository: jadehh/TVSpider
ref: js
path: code
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
- name: TV Config文件生成
run: |
pip install https://github.com/jadehh/pythonTools/releases/download/JadeV2.1.7/jade-2.1.7-py3-none-any.whl
python build.py --aliToken "${{ secrets.Ali_TOKEN }}"
- name: 上传Config
run: |
git config --global user.email "[email protected]"
git config --global user.name "jade"
git add 18_open_config.json
git add 18_tv_config.json
git add open_config.json
git add tv_config.json
commit_msg="* 更新TVConfig"
git commit -a -m "$commit_msg"
- name: Config上传Github分支
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_PAT }}
repository: jadehh/TVSpider
directory: .
branch: js
force: true
tags: true
env:
GITHUB_ACTOR: jadehh
- name: Config上传Gitee分支
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GT_TOKEN }}
repository: jadehh_743/TVSpider
directory: .
branch: js
force: true
tags: true
github_url: https://gitee.com
env:
GITHUB_ACTOR: jadehh
- name: 发布版本
run: |
cd code/nodejs
npm install qs --save
npm install
npm run build
- name: 新建分支
run: |
git config --global user.email "[email protected]"
git config --global user.name "jade"
checkname=$(git rev-list --max-parents=0 HEAD)
git checkout $checkname -b dist ##分支不存在用这个
# git checkout dist ## 分支已存在用这个
cp -r code/nodejs/dist/* ./
cp -r code/nodejs/readme.md ./README.md
git add index.config.js
git add index.config.js.md5
git add index.js
git add index.js.md5
git add README.md
commit_msg="* 发布 CatVodOpen新源"
git commit -a -m "$commit_msg"
- name: 查看分支
run: |
ls -l
- name: 上传Github分支
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_PAT }}
repository: jadehh/TVSpider
directory: .
branch: dist
force: true
tags: true
env:
GITHUB_ACTOR: jadehh
- name: 上传Gitee分支
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GT_TOKEN }}
repository: jadehh_743/TVSpider
directory: .
branch: dist
force: true
tags: true
github_url: https://gitee.com
env:
GITHUB_ACTOR: jadehh