Skip to content

* 删除无效源

* 删除无效源 #82

Workflow file for this run

name: Spider
on:
push:
tags:
- V[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: JS分支下载
uses: actions/checkout@v3
with:
repository: jadehh/TVSpider
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
- name: 下载代码
uses: actions/checkout@v3
with:
repository: jadehh/TVSpider
path: code
fetch-depth: 0 # 显示所有提交的日志
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
- name: TV Config文件生成
run: |
cd code
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"
checkname=$(git rev-list --max-parents=0 HEAD)
git checkout $checkname -b js ##分支不存在用这个
# git checkout dist ## 分支已存在用这个
cp -r code/18_open_config.json ./
cp -r code/18_tv_config.json ./
cp -r code/open_config.json ./
cp -r code/tv_config.json ./
cp -r code/js/ ./
cp -r code/lib ./
cp -r code/README.md ./README.md
cp -r code/resources ./
git add 18_open_config.json
git add 18_tv_config.json
git add open_config.json
git add tv_config.json
git add resources
git add js
git add lib
git add README.md
commit_msg="* 更新TVConfig和OpenConfig"
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
- name: 18+Config文件生成
run: |
cd code
python build.py --aliToken "${{ secrets.Ali_TOKEN }}" --is_18 True
- name: 18+发布版本
run: |
cd code/nodejs
npm install qs --save
npm install
npm run build
- name: 新建18+分支
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 18_dist ##分支不存在用这个
# git checkout 18_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 18+ 新源"
git commit -a -m "$commit_msg"
- name: 18+查看分支
run: |
ls -l
- name: 18+上传Github分支
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_PAT }}
repository: jadehh/TVSpider
directory: .
branch: 18_dist
force: true
tags: true
env:
GITHUB_ACTOR: jadehh
- name: 18+上传Gitee分支
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GT_TOKEN }}
repository: jadehh_743/TVSpider
directory: .
branch: 18_dist
force: true
tags: true
github_url: https://gitee.com
env:
GITHUB_ACTOR: jadehh