Automate uploading Obsidian artifacts to new releases

This commit is contained in:
Debanjum Singh Solanky 2023-02-17 18:14:46 -06:00
parent a8940462c4
commit 47c2cc63e1
3 changed files with 50 additions and 6 deletions

View file

@ -24,13 +24,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v1 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}

View file

@ -12,7 +12,51 @@ on:
type: string type: string
jobs: jobs:
publish: publish_obsidian_plugin:
name: Publish Obsidian Plugin
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: src/interface/obsidian
steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Build Obsidian Plugin
run: |
yarn
yarn run build --if-present
- name: Upload Obsidian Plugin main.js
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: main.js
path: src/interface/obsidian/main.js
- name: Upload Obsidian Plugin manifest.json
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: manifest.json
path: src/interface/obsidian/manifest.json
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
files: |
src/interface/obsidian/main.js
src/interface/obsidian/manifest.json
publish_desktop_apps:
name: Publish Desktop Apps
strategy: strategy:
matrix: matrix:
include: include:
@ -114,4 +158,5 @@ jobs:
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
with: with:
generate_release_notes: true
files: dist/khoj_${{github.ref_name}}_amd64.${{matrix.extension}} files: dist/khoj_${{github.ref_name}}_amd64.${{matrix.extension}}

View file

@ -11,8 +11,7 @@ COPY . /app
WORKDIR /app WORKDIR /app
# Install Python Dependencies # Install Python Dependencies
RUN pip install --upgrade pip && \ RUN pip install --upgrade pip && pip install --upgrade ".[dev]"
pip install --upgrade .
# Run the Application # Run the Application
# There are more arguments required for the application to run, # There are more arguments required for the application to run,