Skip to content

Commit 803dac8

Browse files
committed
workflows for version and build
1 parent 809090b commit 803dac8

2 files changed

Lines changed: 100 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build Sysmon Builder
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.11"
18+
19+
- name: Install dependencies
20+
run: |
21+
pip install -r requirements.txt
22+
pip install pyinstaller
23+
24+
- name: Build
25+
run: |
26+
pyinstaller --windowed --onedir main.py
27+
28+
- name: Upload build
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: sysmon-config-builder
32+
path: dist/

.github/workflows/release.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Release Sysmon Builder
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, windows-latest]
13+
runs-on: ${{ matrix.os }}
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.11"
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install PySide6 pyinstaller
28+
29+
- name: Build application
30+
run: |
31+
pyinstaller --noconfirm --windowed --onedir --name sysmon-builder main.py
32+
33+
- name: Archive Linux build
34+
if: runner.os == 'Linux'
35+
run: |
36+
cd dist
37+
tar -czf sysmon-builder-linux.tar.gz sysmon-builder
38+
39+
- name: Archive Windows build
40+
if: runner.os == 'Windows'
41+
run: |
42+
powershell Compress-Archive -Path dist\sysmon-builder -DestinationPath dist\sysmon-builder-windows.zip
43+
44+
- name: Upload Linux artifact
45+
if: runner.os == 'Linux'
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: sysmon-builder-linux
49+
path: dist/sysmon-builder-linux.tar.gz
50+
51+
- name: Upload Windows artifact
52+
if: runner.os == 'Windows'
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: sysmon-builder-windows
56+
path: dist/sysmon-builder-windows.zip
57+
58+
- name: Create GitHub Release and upload Linux asset
59+
if: runner.os == 'Linux'
60+
uses: softprops/action-gh-release@v2
61+
with:
62+
files: dist/sysmon-builder-linux.tar.gz
63+
64+
- name: Upload Windows asset to GitHub Release
65+
if: runner.os == 'Windows'
66+
uses: softprops/action-gh-release@v2
67+
with:
68+
files: dist/sysmon-builder-windows.zip

0 commit comments

Comments
 (0)