Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ixth committed Nov 24, 2022
1 parent 4985a5c commit 56fa9b6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release Obsidian plugin

on:
push:
tags:
- "*"

env:
PLUGIN_NAME: obsidian-stylist

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: package.json

- name: Build
id: build
run: |
npm ci
npm run build
- name: Pack
id: pack
run: |
mkdir ${{ env.PLUGIN_NAME }}
cp main.js manifest.json ${{ env.PLUGIN_NAME }}
zip -r "${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip" ${{ env.PLUGIN_NAME }}
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip
LICENSE
main.js
manifest.json
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"name": "obsidian-stylist",
"engines": {
"node": ">=12.0.0 "
},
"version": "0.0.1",
"description": "Obsidian plugin that allows to add classes and styles on markdown blocks",
"main": "main.js",
Expand Down

0 comments on commit 56fa9b6

Please sign in to comment.