Skip to content

Commit dea95f0

Browse files
committed
Add GitHub Actions release workflow
1 parent 8418e7d commit dea95f0

File tree

2 files changed

+45
-6
lines changed

2 files changed

+45
-6
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release Obsidian plugin
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Use Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: "18.x"
20+
21+
- name: Build plugin
22+
run: |
23+
npm install
24+
npm run build
25+
26+
- name: Create release
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: |
30+
tag="${GITHUB_REF#refs/tags/}"
31+
32+
gh release create "$tag" \
33+
--title="$tag" \
34+
--draft \
35+
main.js manifest.json

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,25 @@ An Obsidian plugin that automatically commits vault changes to git.
1313

1414
## Installation
1515

16-
### Manual Installation
16+
### From GitHub Releases (Recommended)
1717

18-
1. Download `main.js` and `manifest.json` from releases
19-
2. Create folder `.obsidian/plugins/auto-git-commit/` in your vault
20-
3. Copy downloaded files into the folder
21-
4. Enable the plugin in Obsidian settings
18+
1. Go to [Releases](https://github.com/whtiehack/obsidian-git-auto-commit/releases)
19+
2. Download `main.js` and `manifest.json` from the latest release
20+
3. Create folder `<vault>/.obsidian/plugins/auto-git-commit/`
21+
4. Copy downloaded files into the folder
22+
5. Restart Obsidian and enable the plugin in Settings → Community plugins
2223

2324
### Build from Source
2425

2526
```bash
26-
cd .obsidian/plugins/auto-git-commit
27+
git clone https://github.com/whtiehack/obsidian-git-auto-commit.git
28+
cd obsidian-git-auto-commit
2729
npm install
2830
npm run build
2931
```
3032

33+
Then copy `main.js` and `manifest.json` to your vault's plugin folder.
34+
3135
## Commands
3236

3337
| Command | Description |

0 commit comments

Comments
 (0)