Change shorthand syntax language to allow for correct Markdown syntax… #13
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: 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: 'Zip files' | |
uses: montudor/action-zip@v1 | |
with: | |
args: "zip -qq -r emera-${{fromJson(steps.set_var.outputs.manifestJson).version}}.zip main.js manifest.json styles.css" | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: "${{fromJson(steps.set_var.outputs.manifestJson).version}}" | |
generate_release_notes: false | |
files: | | |
*.zip | |
manifest.json | |
main.js | |
styles.css |