mirror of
https://github.com/raven-pensieve/obsidian-ace-code-editor.git
synced 2026-07-22 05:48:56 +00:00
ci: 添加构建制品证明生成功能
在发布工作流中添加构建制品证明生成步骤,以增强 安全性和可追溯性。 新增 id-token 和 attestations 权限以支持制品 证明的生成。使用 actions/attest-build-provenance 操作为主要输出文件(main.js、manifest.json 和 styles.css)生成证明,确保发布的制品的完整性 和来源可验证。
This commit is contained in:
parent
09a76f0047
commit
f2fd8e44e0
1 changed files with 10 additions and 0 deletions
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
|
|
@ -7,6 +7,8 @@ on:
|
|||
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
attestations: write
|
||||
|
||||
env:
|
||||
PLUGIN_ID: ace-code-editor # 插件ID
|
||||
|
|
@ -61,6 +63,14 @@ jobs:
|
|||
pnpm run build
|
||||
echo "tag_name=$(git tag --sort version:refname | tail -n 1)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate artifact attestation
|
||||
uses: actions/attest-build-provenance@v2
|
||||
with:
|
||||
subject-path: |
|
||||
dist/main.js
|
||||
dist/manifest.json
|
||||
dist/styles.css
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
|
|
|||
Loading…
Reference in a new issue