Add CI release workflow, CHANGELOG.md, issue templates

- .github/workflows/release.yml: on tag push, build exe via PyInstaller,
  package portable zip, attach SHA-256, create GitHub Release.
- CHANGELOG.md: Keep a Changelog format, semver.
- .github/ISSUE_TEMPLATE/: bug_report.yml + feature_request.yml + config.yml
  routing security reports to private advisories.
This commit is contained in:
engelgardt 2026-05-16 11:59:16 +03:00
parent bb9bf1fa09
commit 7871f63c7d
5 changed files with 193 additions and 0 deletions

56
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View file

@ -0,0 +1,56 @@
name: Bug report
description: Something doesn't work as expected
labels: ["bug"]
body:
- type: input
id: version
attributes:
label: Version
description: Visible in the startup banner.
placeholder: v1.1.0
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. ...
2. ...
3. ...
validations:
required: true
- type: textarea
id: expected
attributes:
label: What you expected to happen
validations:
required: true
- type: textarea
id: actual
attributes:
label: What actually happened
description: Paste any error output verbatim. Screenshots are welcome.
validations:
required: true
- type: input
id: os
attributes:
label: Windows version
placeholder: e.g. Windows 11 24H2
- type: input
id: network
attributes:
label: Network setup (if relevant)
placeholder: e.g. USB Realtek NIC to a server's BMC port via an 8-port switch
- type: textarea
id: extra
attributes:
label: Anything else?
description: Workarounds tried, related links, etc.

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Security vulnerability
url: https://github.com/Engelgardt23/dhcpsrv/security/advisories/new
about: Please report security issues privately via GitHub Security Advisories — not as a public issue.

View file

@ -0,0 +1,23 @@
name: Feature request
description: Suggest a new feature or an improvement
labels: ["enhancement"]
body:
- type: textarea
id: motivation
attributes:
label: What's the use case?
description: What are you trying to do, and why is the current behavior not enough?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed solution
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered

80
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,80 @@
name: Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install build dependencies
run: python -m pip install --upgrade pip pyinstaller rich
- name: Resolve version from tag
id: ver
shell: bash
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Build executable
run: python -m PyInstaller --onefile --uac-admin --console --name dhcpsrv dhcpsrv_app.py
- name: Package portable folder
shell: pwsh
run: |
$ver = '${{ steps.ver.outputs.version }}'
$folder = "dhcpsrv-v$ver"
New-Item -ItemType Directory -Path $folder | Out-Null
Copy-Item dist/dhcpsrv.exe $folder/
@"
dhcpsrv v$ver - portable edition
made by engelgardt
Minimal laptop-side DHCP server for storage/server engineers.
USAGE
Double-click dhcpsrv.exe.
Accept the UAC prompt (admin needed to bind UDP/67 and reconfigure the NIC).
Pick the NIC plugged into your server/switch - that's the only question.
Press Ctrl+C to stop.
DEFAULTS
Server IP : 10.10.10.1/24
Pool : 10.10.10.2 .. 10.10.10.51 (50 addresses)
Lease : 7200 seconds (2 hours)
TFTP opt : server IP
NOTES
- Nothing is installed. Delete the folder to remove.
- UAC prompt appears every time (no scheduled-task shortcut in portable mode).
- If Tftpd32 has its DHCP module enabled, disable it - UDP/67 is then taken.
"@ | Out-File -FilePath "$folder/README.txt" -Encoding UTF8
Compress-Archive -Path $folder -DestinationPath "dhcpsrv-portable-v$ver.zip"
- name: Generate SHA-256 checksum
shell: pwsh
run: |
$ver = '${{ steps.ver.outputs.version }}'
$zip = "dhcpsrv-portable-v$ver.zip"
$hash = (Get-FileHash -Algorithm SHA256 $zip).Hash.ToLower()
"$hash $zip" | Out-File -FilePath "$zip.sha256" -Encoding ASCII -NoNewline
Get-Content "$zip.sha256"
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: |
dhcpsrv-portable-v${{ steps.ver.outputs.version }}.zip
dhcpsrv-portable-v${{ steps.ver.outputs.version }}.zip.sha256
generate_release_notes: true

29
CHANGELOG.md Normal file
View file

@ -0,0 +1,29 @@
# Changelog
All notable changes to **dhcpsrv** are documented in this file.
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [1.1.0] - 2026-05-16
### Added
- Auto-update check on startup. Polls GitHub `/releases/latest` with a 3-second timeout. If a newer version is available, prints a yellow notice and offers to open the download page in your browser. Silent on offline / API errors.
## [1.0.0] - 2026-05-16
### Added
- First public release on GitHub.
- Single portable `.exe` (~12 MB) — no Python required on target machines.
- Full-screen TUI built on `rich`: header with server config + live counters (Leases / Pkts / DISCOVER / REQUEST / RELEASE), clients table (`#`, IP, Hostname, MAC, Last seen, Ping), scrolling events panel.
- Hardcoded sensible defaults: server `10.10.10.1/24`, pool `10.10.10.2..10.10.10.51` (50 addresses), lease `7200 s`, TFTP option (66/150) = server IP.
- Only one prompt at startup: NIC selection.
- Adapter filter — only physical wired NICs appear in the picker (no Wi-Fi, VPN, virtual, Hyper-V, VMware, VirtualBox, TAP/TUN, WireGuard, OpenVPN, Tailscale, ZeroTier, Bluetooth, Loopback, WAN Miniport).
- Reliable ping check via the `TTL=` substring in `ping` output — a real BMC reboot is reflected as red `--`.
- Pure event-driven UI refresh — no flicker on resize or while idle.
- Auto-fit clients table to terminal height (`(+N more — enlarge the window)` marker on overflow).
- Scrollback cleared on startup so mouse-wheel doesn't expose pre-launch text.
- MIT licensed.
[Unreleased]: https://github.com/Engelgardt23/dhcpsrv/compare/v1.1.0...HEAD
[1.1.0]: https://github.com/Engelgardt23/dhcpsrv/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/Engelgardt23/dhcpsrv/releases/tag/v1.0.0