Skip to content

Release Obsidian plugin #3

Release Obsidian plugin

Release Obsidian plugin #3

Workflow file for this run

name: Release Obsidian plugin
on:
workflow_dispatch:
push:
branches:
- master
paths:
- "manifest.json"
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"
cache: "yarn"
- run: yarn install --frozen-lockfile
- id: set_var
run: |
content=`cat ./manifest.json`
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
# end of optional handling for multi line json
echo "::set-output name=manifestJson::$content"
- name: Build plugin
run: yarn build
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: "${{fromJson(steps.set_var.outputs.manifestJson).version}}"
generate_release_notes: false
files: |
main.js manifest.json styles.css