Skip to content

Commit 47c2cc6

Browse files
committed
Automate uploading Obsidian artifacts to new releases
1 parent a894046 commit 47c2cc6

File tree

3 files changed

+50
-6
lines changed

3 files changed

+50
-6
lines changed

.github/workflows/dockerize.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout Code
27-
uses: actions/checkout@v2
27+
uses: actions/checkout@v3
2828

2929
- name: Set up Docker Buildx
30-
uses: docker/setup-buildx-action@v1
30+
uses: docker/setup-buildx-action@v2
3131

3232
- name: Login to GitHub Container Registry
33-
uses: docker/login-action@v1
33+
uses: docker/login-action@v2
3434
with:
3535
registry: ghcr.io
3636
username: ${{ github.repository_owner }}

.github/workflows/release.yml

+46-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,51 @@ on:
1212
type: string
1313

1414
jobs:
15-
publish:
15+
publish_obsidian_plugin:
16+
name: Publish Obsidian Plugin
17+
runs-on: ubuntu-latest
18+
defaults:
19+
run:
20+
shell: bash
21+
working-directory: src/interface/obsidian
22+
steps:
23+
- uses: actions/checkout@v3
24+
25+
- name: Install Node
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: "lts/*"
29+
30+
- name: Build Obsidian Plugin
31+
run: |
32+
yarn
33+
yarn run build --if-present
34+
35+
- name: Upload Obsidian Plugin main.js
36+
uses: actions/upload-artifact@v3
37+
with:
38+
if-no-files-found: error
39+
name: main.js
40+
path: src/interface/obsidian/main.js
41+
42+
- name: Upload Obsidian Plugin manifest.json
43+
uses: actions/upload-artifact@v3
44+
with:
45+
if-no-files-found: error
46+
name: manifest.json
47+
path: src/interface/obsidian/manifest.json
48+
49+
- name: Create Release
50+
uses: softprops/action-gh-release@v1
51+
if: startsWith(github.ref, 'refs/tags/')
52+
with:
53+
generate_release_notes: true
54+
files: |
55+
src/interface/obsidian/main.js
56+
src/interface/obsidian/manifest.json
57+
58+
publish_desktop_apps:
59+
name: Publish Desktop Apps
1660
strategy:
1761
matrix:
1862
include:
@@ -114,4 +158,5 @@ jobs:
114158
uses: softprops/action-gh-release@v1
115159
if: startsWith(github.ref, 'refs/tags/')
116160
with:
161+
generate_release_notes: true
117162
files: dist/khoj_${{github.ref_name}}_amd64.${{matrix.extension}}

Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ COPY . /app
1111
WORKDIR /app
1212

1313
# Install Python Dependencies
14-
RUN pip install --upgrade pip && \
15-
pip install --upgrade .
14+
RUN pip install --upgrade pip && pip install --upgrade ".[dev]"
1615

1716
# Run the Application
1817
# There are more arguments required for the application to run,

0 commit comments

Comments
 (0)