mirror of
https://github.com/kissyjpf/rtm-sync.git
synced 2026-07-22 17:50:26 +00:00
35 lines
829 B
YAML
35 lines
829 B
YAML
name: Release Obsidian plugin
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "[0-9]+.[0-9]+.[0-9]+"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "18"
|
|
|
|
- name: Build plugin
|
|
run: |
|
|
npm install
|
|
npm run build
|
|
|
|
- name: Create release with assets
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
tag="${GITHUB_REF#refs/tags/}"
|
|
|
|
# Upload assets to the existing release (or create one)
|
|
gh release upload "$tag" main.js manifest.json styles.css --clobber 2>/dev/null || \
|
|
gh release create "$tag" main.js manifest.json styles.css \
|
|
--title "Release $tag" \
|
|
--generate-notes
|