-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (47 loc) · 1.44 KB
/
release.yml
File metadata and controls
59 lines (47 loc) · 1.44 KB
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
name: 构建并发布
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
id-token: write
attestations: write
jobs:
build-and-publish:
name: 构建并发布
runs-on: windows-latest
steps:
- name: 检出代码
uses: actions/checkout@v6
- name: 安装 Bun
uses: oven-sh/setup-bun@v2
- name: 安装依赖
run: bun install --production
- name: 构建项目
run: bun run build
- name: 部署到插件商店分支
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_branch: release
force_orphan: true
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
- name: 打包插件文件
run: |
Compress-Archive -Path dist/* -DestinationPath AMLL-WS-Connector.zip
Rename-Item -Path AMLL-WS-Connector.zip -NewName AMLL-WS-Connector.plugin
shell: powershell
- name: 生成 Artifact Attestation
uses: actions/attest-build-provenance@v4
with:
subject-path: "AMLL-WS-Connector.plugin"
- name: 提取更新日志
run: bun run scripts/extract-changelog.ts
- name: 创建 Release
uses: softprops/action-gh-release@v2
with:
body_path: RELEASE_NOTES.md
files: AMLL-WS-Connector.plugin