mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-07 21:29:13 +00:00
Add version, arch to app name. Publish artifacts to release
- Allow manual trigger of workflow
This commit is contained in:
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@@ -1,6 +1,7 @@
|
|||||||
name: release
|
name: release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow-dispatch:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
@@ -9,13 +10,7 @@ jobs:
|
|||||||
publish:
|
publish:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||||
- os: ubuntu-latest
|
|
||||||
extension: deb
|
|
||||||
- os: macos-latest
|
|
||||||
extension: dmg
|
|
||||||
- os: windows-latest
|
|
||||||
extension: exe
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@@ -42,6 +37,9 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
pyinstaller Khoj.spec
|
pyinstaller Khoj.spec
|
||||||
|
if [ "$RUNNER_OS" == "Windows" ]; then
|
||||||
|
mv dist/Khoj.exe dist/khoj_"$GITHUB_REF_NAME"_amd64.exe
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Create Mac App DMG
|
- name: Create Mac App DMG
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest'
|
||||||
@@ -60,7 +58,7 @@ jobs:
|
|||||||
--icon "Khoj.app" 175 120 \
|
--icon "Khoj.app" 175 120 \
|
||||||
--hide-extension "Khoj.app" \
|
--hide-extension "Khoj.app" \
|
||||||
--app-drop-link 425 120 \
|
--app-drop-link 425 120 \
|
||||||
"dist/Khoj.dmg" \
|
"dist/khoj_"$GITHUB_REF_NAME"_amd64.dmg" \
|
||||||
"dist/dmg/"
|
"dist/dmg/"
|
||||||
|
|
||||||
- uses: ruby/setup-ruby@v1
|
- uses: ruby/setup-ruby@v1
|
||||||
@@ -85,9 +83,14 @@ jobs:
|
|||||||
chmod 644 package/opt/Khoj
|
chmod 644 package/opt/Khoj
|
||||||
|
|
||||||
# Package the app
|
# Package the app
|
||||||
fpm -C package -s dir -t deb -n "Khoj" --version "$GITHUB_REF_NAME" -p dist/Khoj.deb
|
fpm -C package -s dir -t deb -n "Khoj" --version "$GITHUB_REF_NAME" -p dist/khoj_"$GITHUB_REF_NAME"_amd64.deb
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: khoj_${{github.ref_name}}_amd64.${{ matrix.extension }}
|
path: dist/khoj_${{github.ref_name}}_amd64*
|
||||||
path: dist/Khoj.${{ matrix.extension }}
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: khoj_${{github.ref_name}}_amd64*
|
||||||
|
|||||||
Reference in New Issue
Block a user