mirror of
https://github.com/m-kk/toc.git
synced 2026-07-22 06:44:17 +00:00
51 lines
1.1 KiB
YAML
51 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@v5
|
|
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version: "22.x"
|
|
|
|
- name: Build plugin
|
|
run: |
|
|
npm install
|
|
npm test
|
|
npm run build
|
|
|
|
- name: Attest build provenance
|
|
uses: actions/attest-build-provenance@v3
|
|
with:
|
|
subject-path: |
|
|
main.js
|
|
manifest.json
|
|
styles.css
|
|
|
|
- name: Create release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
tag="${GITHUB_REF#refs/tags/}"
|
|
|
|
# Verify files exist
|
|
ls -la main.js manifest.json styles.css
|
|
|
|
gh release create "$tag" \
|
|
--title="Release $tag" \
|
|
--notes="Obsidian Table of Contents Generator plugin release $tag" \
|
|
--draft \
|
|
--generate-notes \
|
|
main.js manifest.json styles.css
|