Skip to content

Commit 0809385

Browse files
committed
ci:自动发版
1 parent 5a80d0a commit 0809385

File tree

3 files changed

+103
-73
lines changed

3 files changed

+103
-73
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Bulid dev version
1+
name: 构建
22
on:
33
push:
44
workflow_dispatch:
@@ -45,39 +45,3 @@ jobs:
4545
path: |
4646
${{ github.workspace }}/dist/main
4747
include-hidden-files: true
48-
49-
release:
50-
needs: [build_matrix]
51-
runs-on: ubuntu-latest
52-
steps:
53-
- name: Check-out repository
54-
uses: actions/checkout@v4
55-
- name: Prepare release
56-
run: |
57-
mkdir release
58-
mkdir artifacts
59-
- name: Download artifacts
60-
uses: actions/download-artifact@v4
61-
with:
62-
path: artifacts
63-
run-id: ${{needs.build_matrix.outputs.artiid}}
64-
- name: Prepare artifacts
65-
run: |
66-
mv ${{ github.workspace }}/artifacts/NamePicker-Action-Windows release/NamePicker-Action-Windows
67-
mv ${{ github.workspace }}/artifacts/NamePicker-Action-Linux release/NamePicker-Action-Linux
68-
69-
- name: Zip artifact
70-
run: |
71-
zip -r release/NamePicker-Action-Windows.zip release/NamePicker-Action-Windows
72-
zip -r release/NamePicker-Action-Linux.zip release/NamePicker-Action-Linux
73-
74-
- name: Release
75-
uses: softprops/action-gh-release@v2
76-
with:
77-
files: |
78-
${{ github.workspace }}/release/NamePicker-Action-Windows.zip
79-
${{ github.workspace }}/release/NamePicker-Action-Linux.zip
80-
body_path: CHANGELOG.md
81-
draft: true
82-
env:
83-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: 构建+自动发版
2+
on:
3+
push:
4+
tags:
5+
- v*.*.*dev
6+
- v*.*.*d*dev
7+
- v*.*.*rel
8+
- v*.*.*d*rel
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
build_matrix:
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, windows-latest]
19+
runs-on: ${{ matrix.os }}
20+
outputs:
21+
artiid: ${{ steps.artifact-upload-step.outputs.artifact-id }}
22+
steps:
23+
- name: Check-out repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.12'
30+
architecture: 'x64'
31+
cache: 'pip'
32+
cache-dependency-path: |
33+
**/requirements*.txt
34+
35+
- name: Install Dependencies
36+
run: |
37+
pip install -r requirements.txt
38+
pip install -i https://test.pypi.org/simple/ RinUI --no-deps
39+
40+
- name: Build Executable
41+
run: |
42+
pyinstaller main.spec
43+
python post_build.py
44+
45+
- name: Upload Artifacts
46+
uses: actions/upload-artifact@v4
47+
id: artifact-upload-step
48+
with:
49+
name: NamePicker-Action-${{ runner.os }}
50+
path: |
51+
${{ github.workspace }}/dist/main
52+
include-hidden-files: true
53+
54+
release:
55+
needs: [build_matrix]
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Check-out repository
59+
uses: actions/checkout@v4
60+
61+
- name: Prepare release
62+
run: |
63+
mkdir release
64+
mkdir artifacts
65+
66+
- name: Download artifacts
67+
uses: actions/download-artifact@v4
68+
with:
69+
path: artifacts
70+
run-id: ${{needs.build_matrix.outputs.artiid}}
71+
72+
- name: Prepare artifacts
73+
run: |
74+
mv ${{ github.workspace }}/artifacts/NamePicker-Action-Windows release/NamePicker-Action-Windows
75+
mv ${{ github.workspace }}/artifacts/NamePicker-Action-Linux release/NamePicker-Action-Linux
76+
77+
- name: Zip artifact
78+
run: |
79+
zip -r release/NamePicker-${{ github.ref_name }}-Windows.zip release/NamePicker-Action-Windows
80+
zip -r release/NamePicker-${{ github.ref_name }}-Linux.zip release/NamePicker-Action-Linux
81+
82+
- name: Get release info
83+
id: release_info
84+
run: |
85+
$tag = "${{ github.ref_name }}"
86+
$version = $tag -replace '^v', ''
87+
echo "version=$version" >> $env:GITHUB_OUTPUT
88+
echo "tag=$tag" >> $env:GITHUB_OUTPUT
89+
90+
- name: Release
91+
uses: softprops/action-gh-release@v2
92+
with:
93+
files: |
94+
${{ github.workspace }}/release/NamePicker-${{ github.ref_name }}-Windows.zip
95+
${{ github.workspace }}/release/NamePicker-${{ github.ref_name }}-Linux.zip
96+
body_path: CHANGELOG.md
97+
draft: false
98+
prerelease: ${{ contains(steps.release_info.outputs.version, 'dev') }}
99+
env:
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,6 @@
1-
> 「恩公,纵然银河迢递,星汉漫漫,只要彼此挂念,总有重逢之时。」
1+
## 新特性
22

3-
## 新特性(相对v2.1.0rel)
4-
5-
- 支持在软件内检查和下载更新
6-
7-
> [!warning]
8-
>
9-
> - 您可能需要使用魔↑术技巧或者其他手段来下载更新
10-
>
11-
> - 目前不能自动安装更新,请在下载完成后按照软件内指南来安装更新
12-
13-
- 支持在抽选时选择多个名单(#12)
14-
15-
- 可以保存上次启动时的悬浮窗位置(#12)
16-
17-
> [!note]
18-
>
19-
> 如果悬浮窗被拖到了一些难以拖回来的位置,在启动时附上`reset_pos`参数即可重置悬浮窗位置
20-
21-
- 重新设计了二步验证的界面
22-
23-
## Bug修复
24-
25-
- 修复了关闭主界面时悬浮窗关闭的问题(#12)
26-
27-
- 修复了开启课表软件联动时无法快捷抽选的问题
28-
29-
## 贡献者
30-
31-
- 感谢@undefftr为图标设计提供了建议
32-
33-
## 稍微插点广告不过分吧
34-
35-
NamePicker有宣传片了!点击[链接](https://www.bilibili.com/video/BV1tZGwzvEra/)在Bilibili上观看
36-
37-
> 对于可能无法/不想使用超链接跳转观看的用户,可以在Bilibili上搜索`BV1tZGwzvEra`以观看
3+
这版是测试自动发版的,和v2.2.0rel没有任何区别
384

395
## 已知Bug
406

0 commit comments

Comments
 (0)