Build obsidian plugin #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build obsidian plugin | |
on: | |
push: | |
tags: | |
- "*" | |
workflow_dispatch: | |
env: | |
PLUGIN_NAME: recipe-grabber # Change this to the name of your plugin-id folder | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16.x" | |
- name: Set Version ENV | |
run: echo "VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build --if-present | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
main.js | |
manifest.json | |
styles.css | |
name: ${{ env.VERSION }} | |
tag_name: ${{ env.VERSION}} | |
repository: ${{ github.repository }} | |
draft: true | |
prerelease: false |