Skip to content

update docs

update docs #15

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
build_win:
name: Build on Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
- name: Install requirements
run: pip install -r requirements.txt
- name: Build executable
run: pyinstaller package/build.spec
- name: Package
run: |
$line = Select-String -Path src\config.py -Pattern 'KRAIT_VERSION =' | Out-String
$version = $line.Split('"')[1]
iscc /DMyAppVersion=$version package/build_win_installer.iss
cd dist
7z a Krait-v$version-win64.7z Krait
- uses: actions/upload-artifact@v4
with:
name: Krait-win64
path: |
dist/*.exe
dist/*.7z
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*.exe
dist/*.7z
build_ubuntu:
name: Build on Ubuntu20.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
- name: Install build requirements
run: pip3 install -r requirements.txt
- name: Build executable
run: pyinstaller package/build.spec
- name: Package installer
run: |
version=`awk '/^KRAIT_VERSION/{print $NF}' src/config.py | sed 's/\"//g'`
cd dist
chmod a+x ../package/build_linux_desktop.sh
../package/build_linux_desktop.sh $version
- uses: actions/upload-artifact@v4
with:
name: Krait-ubuntu20.04
path: |
dist/*.deb
dist/*.tar.gz
dist/*.AppImage
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*.deb
dist/*.tar.gz
dist/*.AppImage
build_modern:
name: Build on Ubuntu22.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
- name: Install build requirements
run: pip3 install -r requirements.txt
- name: Build executable
run: pyinstaller package/build.spec
- name: Package installer
run: |
version=`awk '/^KRAIT_VERSION/{print $NF}' src/config.py | sed 's/\"//g'`
cd dist
chmod a+x ../package/build_linux_desktop.sh
../package/build_linux_desktop.sh $version
- uses: actions/upload-artifact@v4
with:
name: Krait-ubuntu22.04
path: |
dist/*.deb
dist/*.tar.gz
dist/*.AppImage
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*.deb
dist/*.tar.gz
dist/*.AppImage
build_mac:
name: Build on MacOS
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
- name: Install requirements
run: pip3 install -r requirements.txt
- name: Build executable
run: pyinstaller package/build.spec
- name: Package
run: |
version=`awk '/^KRAIT_VERSION/{print $NF}' src/config.py | sed 's/\"//g'`
npm install --global create-dmg
cd dist
create-dmg Krait.app || test -f Krait\ 0.0.0.dmg
mv Krait\ 0.0.0.dmg Krait-v${version}-macos.dmg
tar -czvf Krait-v${version}-macos.tar.gz Krait.app
- uses: actions/upload-artifact@v4
with:
name: Krait-macos
path: |
dist/*.dmg
dist/*.tar.gz
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*.dmg
dist/*.tar.gz