-
Notifications
You must be signed in to change notification settings - Fork 39
69 lines (58 loc) · 2.37 KB
/
auto_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
# This is a basic workflow to help you get started with Actions
name: Check JMComic Android APK
# Controls when the workflow will run
on:
push:
workflow_dispatch:
schedule:
- cron: '0 */2 * * *'
permissions:
contents: write
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Dependency
run: |
python -m pip install --upgrade pip
pip install jmcomic
- name: Run Script
id: script
run: |
python main.py
- name: Release
if: ${{ steps.script.outputs.found_new == 'true'}}
uses: softprops/action-gh-release@v1
with:
name: v${{ steps.script.outputs.new_ver }}
tag_name: ${{ steps.script.outputs.new_ver }}
draft: false
files: |
${{ steps.script.outputs.new_ver }}.apk
body: |
禁漫APP v${{ steps.script.outputs.new_ver }}
你可以直接下载Assets的`${{ steps.script.outputs.new_ver }}.apk`使用,或者从禁漫官网下载:
禁漫官网的`${{ steps.script.outputs.new_ver }}.apk`下载链接:
1. [https://18comic.vip${{ steps.script.outputs.download_path }}](https://18comic.vip${{ steps.script.outputs.download_path }})
2. [https://jmcomic1.me${{ steps.script.outputs.download_path }}](https://jmcomic1.me${{ steps.script.outputs.download_path }})
3. [https://18comic.vip/stray](https://18comic.vip/stray/)(发布页)
`${{ steps.script.outputs.new_ver }}.apk`的更新信息:
> ${{ steps.script.outputs.desc }}
- name: Commit
if: ${{ steps.script.outputs.found_new == 'true'}}
run: |
# Extract the version number from the previous step
version=${{ steps.script.outputs.new_ver }}
git config --global user.email "[email protected]"
git config --global user.name "hect0x7"
git tag -a "v$version" -m "Version $version"
git add ./APK_VERSION.txt
git commit -m "update APK_VERSION.txt"
git push
echo "finished"