netajam_obsidian_note_uid_g.../.github/workflows/release.yml
Netajam 49287280c7 Use --legacy-peer-deps in release workflow
The release CI's `npm install` ran into the @types/node peer-dep
mismatch between the project's pinned `@types/node@^16` and
vitest@1.6.1's peerOptional `@types/node@^18 || >=20`. Locally we
work around this with --legacy-peer-deps; mirror that flag in CI so
the release build can produce main.js.
2026-04-27 22:12:56 +02:00

35 lines
693 B
YAML

name: Release Obsidian plugin
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Build plugin
run: |
npm install --legacy-peer-deps
npm run build
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF#refs/tags/}"
gh release create "$tag" \
--title="$tag" \
--draft \
main.js manifest.json styles.css