Skip to content

Commit

Permalink
ci: Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Otto-J committed Oct 16, 2023
1 parent 2ea0953 commit f2e1bbd
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 10 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release Obsidian plugin

on:
push:
tags:
- "*"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"

- name: Build plugin
run: |
pnpm install
pnpm run build
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF#refs/tags/}"
gh release create "$tag" \
--title="$tag" \
--draft \
main.js manifest.json styles.css
16 changes: 8 additions & 8 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"id": "obsidian-sync-xlog",
"name": "Obsidian Sync Xlog",
"version": "0.0.1",
"minAppVersion": "0.12.0",
"description": "A plugin let you sync your obsidian vault with xlog",
"author": "Otto-J@github",
"authorUrl": "https://github.com/otto-j",
"isDesktopOnly": false
"id": "obsidian-sync-xlog",
"name": "Obsidian Sync Xlog",
"version": "0.0.1",
"minAppVersion": "0.12.0",
"description": "A plugin let you sync your obsidian vault with xlog",
"author": "Otto-J@github",
"authorUrl": "https://github.com/Otto-J/Obsidian-sync-xlog",
"isDesktopOnly": false
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"dev": "npm run lint && vite build --watch",
"build": "npm run type-check && vite build && cp manifest.json dist",
"build": "npm run type-check && vite build ",
"format": "prettier --write src/",
"bumpversion": "node version-bump.mjs && git add manifest.json versions.json"
},
"keywords": [],
"author": "Otto",
"homepage": "https://github.com/Otto-J/Obsidian-sync-xlog",
"devDependencies": {
"@rushstack/eslint-patch": "^1.2.0",
"@tsconfig/node18": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default defineConfig(() => {
rollupOptions: {
output: {
// Overwrite default Vite output fileName
dir: "./dist",
// dir: "./dist",
entryFileNames: "main.js",
assetFileNames: "styles.css",
},
Expand Down

0 comments on commit f2e1bbd

Please sign in to comment.