40 lines
774 B
YAML
40 lines
774 B
YAML
name: Publish Obsidian plugin
|
|
|
|
on:
|
|
push:
|
|
tags: ["*"]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
publish-plugin:
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js environment
|
|
uses: actions/setup-node@v4.2.0
|
|
with:
|
|
node-version: "22.x"
|
|
check-latest: true
|
|
|
|
- name: Build plugin
|
|
run: |
|
|
cd frontend
|
|
npm ci
|
|
npm run build
|
|
|
|
- name: Create release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
tag="${GITHUB_REF#refs/tags/}"
|
|
|
|
cd frontend/obsidian-plugin/dist
|
|
|
|
gh release create "$tag" \
|
|
--title="$tag" \
|
|
--draft \
|
|
main.js manifest.json styles.css
|