-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (49 loc) · 1.22 KB
/
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
name: 发行
on:
workflow_dispatch:
inputs:
rname:
description: '发行版名称'
type: string
tag_name:
description: '标签名称'
type: string
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: windows-latest
steps:
- name: 仓库初始化
uses: actions/checkout@v3
- name: 安装 Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Rust 缓存
uses: Swatinem/rust-cache@v2.7.3
- name: 编译exe
uses: actions-rs/cargo@v1
with:
command: build
args: --release
#- name: 上传文件
# uses: actions/upload-artifact@v4
# with:
# name: AppDataCleaner
# path: |
# target\release\AppDataCleaner.exe
# target\release\AppDataCleaner.pdb
- name: 自动发布发行版
uses: softprops/action-gh-release@v2
with:
name: ${{ inputs.rname }}
tag_name: ${{ inputs.tag_name }}
draft: false
make_latest: true
files: |
target/release/AppDataCleaner.exe
target/release/AppDataCleaner.pdb
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}