2024-01-30 20:41:53 +00:00
|
|
|
name: Build and Release NSIS Installer
|
|
|
|
on: [push]
|
2024-01-30 20:41:25 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-and-release:
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Set up Python 3.11
|
|
|
|
uses: actions/setup-python@v5
|
|
|
|
with:
|
|
|
|
python-version: "3.11"
|
|
|
|
|
2024-02-29 14:05:54 +00:00
|
|
|
- name: Electron Builder
|
|
|
|
working-directory: gui
|
|
|
|
run: |
|
|
|
|
npm i
|
|
|
|
npm run build
|
|
|
|
|
|
|
|
- name: LIST ALL FILES
|
|
|
|
run: ls -R
|
|
|
|
|
2024-01-30 20:41:25 +00:00
|
|
|
- name: Install Python dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install -r requirements.txt
|
|
|
|
|
2024-02-10 20:36:14 +00:00
|
|
|
- uses: robinraju/release-downloader@v1.9
|
|
|
|
with:
|
|
|
|
repository: "Hamlib/Hamlib"
|
|
|
|
fileName: " hamlib-w64-*.zip"
|
|
|
|
latest: true
|
|
|
|
extract: true
|
2024-04-17 20:49:08 +00:00
|
|
|
out-file-path: "freedata-server/lib/hamlib/"
|
2024-02-10 20:36:14 +00:00
|
|
|
|
2024-01-30 20:41:25 +00:00
|
|
|
- name: Build binaries
|
2024-04-17 20:49:08 +00:00
|
|
|
working-directory: freedata-server
|
2024-01-30 20:41:25 +00:00
|
|
|
run: |
|
|
|
|
python3 -m nuitka --remove-output --assume-yes-for-downloads --follow-imports --include-data-dir=lib=lib --include-data-files=lib/codec2/*=lib/codec2/ --include-data-files=config.ini.example=config.ini --standalone server.py --output-filename=freedata-server
|
|
|
|
|
2024-01-30 21:12:45 +00:00
|
|
|
- name: LIST ALL FILES
|
|
|
|
run: ls -R
|
|
|
|
|
2024-01-30 20:41:25 +00:00
|
|
|
- name: Create installer
|
2024-03-01 11:10:49 +00:00
|
|
|
uses: joncloud/makensis-action@v4.1
|
2024-01-30 20:41:25 +00:00
|
|
|
with:
|
2024-02-29 14:05:54 +00:00
|
|
|
script-file: "freedata-nsis-config.nsi"
|
2024-01-31 09:21:54 +00:00
|
|
|
arguments: '/V3'
|
2024-01-30 20:41:25 +00:00
|
|
|
|
2024-01-30 21:12:45 +00:00
|
|
|
- name: LIST ALL FILES
|
|
|
|
run: ls -R
|
|
|
|
|
2024-01-30 20:41:25 +00:00
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-02-29 14:05:54 +00:00
|
|
|
name: 'FreeDATA-Installer'
|
|
|
|
path: ./FreeDATA-Installer.exe
|
2024-01-30 20:41:25 +00:00
|
|
|
|
|
|
|
- name: Upload Installer to Release
|
2024-04-01 16:21:58 +00:00
|
|
|
uses: softprops/action-gh-release@v2
|
2024-01-30 20:41:25 +00:00
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
with:
|
|
|
|
draft: true
|
2024-02-29 14:05:54 +00:00
|
|
|
files: ./FreeDATA-Installer.exe
|
2024-03-03 10:09:29 +00:00
|
|
|
tag_name: ${{ github.ref_name }}
|
|
|
|
name: 'FreeDATA-Installer-${{ github.ref_name }}'
|