Skip to content

Build Obsidian Plugin #6

Build Obsidian Plugin

Build Obsidian Plugin #6

Workflow file for this run

name: Build Obsidian Plugin
on: workflow_dispatch
env:
PLUGIN_NAME: obsidian-ribbon-divider
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "20.x"
- name: Build
id: build
run: |
npm ci
npm run build
zip -r ${{ env.PLUGIN_NAME }}.zip dist
ls
echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)"
echo "github.ref: ${{ github.ref }}"
- name: Get Package Version
id: get_package_version
run: echo "PACKAGE_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.PACKAGE_VERSION }}
files: |
${{ env.PLUGIN_NAME }}.zip
main.js
manifest.json
styles.css