-
Notifications
You must be signed in to change notification settings - Fork 86
69 lines (56 loc) · 1.79 KB
/
package.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
name: Upload Release Asset
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install Requirements
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt pyinstaller
- name: Set time zone
uses: szenius/set-timezone@v1.2
with:
timezoneLinux: "Asia/Shanghai"
timezoneMacos: "Asia/Shanghai"
timezoneWindows: "China Standard Time"
- name: Build
run: |
python _build.py --disable_douban
- name: Clear Old Artifact
run: |
python _clear_github_artifact.py
- name: Package
run: |
python _package.py
- name: Generate Changelog For GitHub Release
run: |
python _gen_changelog_for_github_release.py
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
body_path: ./releases/_github_action_artifact/changelog-github.txt
generate_release_notes: true
files: |
./releases/_github_action_artifact/djc_helper.7z
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: "djc_helper.7z"
path: ./releases/_github_action_artifact/djc_helper.7z