mirror of
https://github.com/yan-istart/IStart-Note-AI-Plugin.git
synced 2026-07-22 06:51:37 +00:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: Release Obsidian Plugin
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
attestations: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "18.x"
|
|
|
|
- name: Build plugin
|
|
run: |
|
|
npm ci
|
|
npm run build
|
|
|
|
- name: Generate artifact attestations
|
|
uses: actions/attest-build-provenance@v2
|
|
with:
|
|
subject-path: |
|
|
dist/main.js
|
|
dist/manifest.json
|
|
dist/styles.css
|
|
|
|
- name: Create release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
tag="${GITHUB_REF#refs/tags/}"
|
|
assets="dist/main.js dist/manifest.json"
|
|
if [ -f "dist/styles.css" ]; then
|
|
assets="$assets dist/styles.css"
|
|
fi
|
|
gh release create "$tag" \
|
|
--title="$tag" \
|
|
--generate-notes \
|
|
--draft \
|
|
$assets
|