stracker-phil_obsidian-ment.../.github/workflows/release.yml
2025-04-13 20:06:29 +02:00

47 lines
1.1 KiB
YAML

name: Release Obsidian plugin
env:
PLUGIN_ZIP_NAME: mention-things.zip
on:
workflow_dispatch:
push:
tags:
# Trigger when a new tag is pushed
- "*"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "23.x"
- name: Build plugin
run: |
npm install
npm run build
- name: Create zip archive
run: |
cd dist
zip -r ../${{ env.PLUGIN_ZIP_NAME }} .
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF#refs/tags/}"
gh release create "$tag" \
--title="$tag" \
--draft \
${{ env.PLUGIN_ZIP_NAME }} dist/main.js dist/manifest.json