Add CI release workflow, CHANGELOG.md, issue templates
- .github/workflows/release.yml: on tag push, build exe via ps2exe, 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:
parent
18eac693e9
commit
a854d8e3f7
5 changed files with 181 additions and 0 deletions
55
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
55
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
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.0.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: adapter
|
||||||
|
attributes:
|
||||||
|
label: Adapter (if relevant)
|
||||||
|
placeholder: e.g. Realtek USB GbE Family Controller
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: extra
|
||||||
|
attributes:
|
||||||
|
label: Anything else?
|
||||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Security vulnerability
|
||||||
|
url: https://github.com/Engelgardt23/netswitch/security/advisories/new
|
||||||
|
about: Please report security issues privately via GitHub Security Advisories — not as a public issue.
|
||||||
23
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
23
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal 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
|
||||||
77
.github/workflows/release.yml
vendored
Normal file
77
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Resolve version from tag
|
||||||
|
id: ver
|
||||||
|
shell: bash
|
||||||
|
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Install ps2exe
|
||||||
|
shell: pwsh
|
||||||
|
run: Install-Module -Name ps2exe -Scope CurrentUser -Force -AllowClobber
|
||||||
|
|
||||||
|
- name: Build executable
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
Import-Module ps2exe
|
||||||
|
$ver = '${{ steps.ver.outputs.version }}'
|
||||||
|
Invoke-ps2exe -inputFile netswitch.ps1 -outputFile netswitch.exe `
|
||||||
|
-title "netswitch" -description "NIC IP/DHCP toggle - made by engelgardt" `
|
||||||
|
-company "engelgardt" -version "$ver.0" `
|
||||||
|
-requireAdmin
|
||||||
|
|
||||||
|
- name: Package portable folder
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$ver = '${{ steps.ver.outputs.version }}'
|
||||||
|
$folder = "netswitch-v$ver"
|
||||||
|
New-Item -ItemType Directory -Path $folder | Out-Null
|
||||||
|
Copy-Item netswitch.exe $folder/
|
||||||
|
@"
|
||||||
|
netswitch v$ver - portable edition
|
||||||
|
made by engelgardt
|
||||||
|
|
||||||
|
Quickly set a Windows network adapter to a static IP or back to DHCP.
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
Double-click netswitch.exe.
|
||||||
|
Accept the UAC prompt.
|
||||||
|
Pick the NIC, then choose mode (Static / DHCP).
|
||||||
|
Press Enter to exit.
|
||||||
|
|
||||||
|
NOTES
|
||||||
|
- Nothing is installed. Delete the folder to remove.
|
||||||
|
- Requires Windows 10/11.
|
||||||
|
- PowerShell is bundled into the exe via ps2exe; nothing extra needed.
|
||||||
|
"@ | Out-File -FilePath "$folder/README.txt" -Encoding UTF8
|
||||||
|
Compress-Archive -Path $folder -DestinationPath "netswitch-portable-v$ver.zip"
|
||||||
|
|
||||||
|
- name: Generate SHA-256 checksum
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$ver = '${{ steps.ver.outputs.version }}'
|
||||||
|
$zip = "netswitch-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: |
|
||||||
|
netswitch-portable-v${{ steps.ver.outputs.version }}.zip
|
||||||
|
netswitch-portable-v${{ steps.ver.outputs.version }}.zip.sha256
|
||||||
|
generate_release_notes: true
|
||||||
21
CHANGELOG.md
Normal file
21
CHANGELOG.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to **netswitch** 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.0.0] - 2026-05-16
|
||||||
|
### Added
|
||||||
|
- First public release on GitHub.
|
||||||
|
- Portable `.exe` (~30 KB) built from PowerShell via ps2exe.
|
||||||
|
- Self-elevation through UAC.
|
||||||
|
- Physical wired NIC filter — Wi-Fi, VPN, virtual, Hyper-V, VMware, VirtualBox, TAP/TUN, WireGuard, OpenVPN, Tailscale, ZeroTier, Bluetooth, Loopback and WAN Miniport adapters are hidden from the picker.
|
||||||
|
- Two modes: **Static** (default `10.10.10.1/24`, optional gateway) and **DHCP**.
|
||||||
|
- Current IPv4 configuration is printed after the change.
|
||||||
|
- Auto-update check on startup: polls GitHub `/releases/latest` with a 3-second timeout and offers to open the download page if a newer version exists. Silent on offline / API errors.
|
||||||
|
- MIT licensed.
|
||||||
|
|
||||||
|
[Unreleased]: https://github.com/Engelgardt23/netswitch/compare/v1.0.0...HEAD
|
||||||
|
[1.0.0]: https://github.com/Engelgardt23/netswitch/releases/tag/v1.0.0
|
||||||
Loading…
Reference in a new issue