Build Obsidian Plugin #3
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: workflow_dispatch | |
env: | |
PLUGIN_NAME: obsidian-beautitab | |
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: Get Package Version | |
id: get_package_version | |
run: echo "PACKAGE_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV | |
- name: Build | |
id: build | |
run: | | |
echo Building for version PACKAGE_VERSION | |
npm ci | |
npm run build | |
zip -jr ${{ env.PLUGIN_NAME }}-${{ env.PACKAGE_VERSION }}.zip dist/* | |
ls | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ env.PACKAGE_VERSION }} | |
files: | | |
${{ env.PLUGIN_NAME }}-${{ env.PACKAGE_VERSION }}.zip | |
dist/main.js | |
dist/manifest.json | |
dist/styles.css |