Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions .github/workflows/build-portable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Build Portable Executable

on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
build-linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libpcap-dev ccache patchelf

- name: Build portable executable
run: |
chmod +x scripts/build_portable.sh
./scripts/build_portable.sh

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: nop-portable-linux-amd64
path: backend/dist/nop-portable-*

build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Build portable executable
run: |
cd backend
.\build_nuitka.bat

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: nop-portable-windows
path: backend/dist/nop-portable-windows.exe

build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Build portable executable
run: |
chmod +x scripts/build_portable.sh
./scripts/build_portable.sh --platform macos

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: nop-portable-macos
path: backend/dist/nop-portable-macos

create-release:
needs: [build-linux, build-windows, build-macos]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
nop-portable-linux-amd64/*
nop-portable-windows/*
nop-portable-macos/*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ yarn-error.log*
# React build
frontend/build/

# Nuitka build artifacts
*.build/
*.dist/
*.onefile-build/
backend/dist/
backend/build/

# IDEs
.vscode/
.idea/
Expand All @@ -27,3 +34,10 @@ frontend/build/
# OS
.DS_Store
Thumbs.db

# Portable build artifacts
backend/frontend_build/
*.so
*.dylib
*.dll
*.pyd
Loading