mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 15:39:42 +00:00
- Rewrite check.yml for Windows (PowerShell syntax check, Go linting) - Rewrite test.yml for Windows (Pester tests, Go tests, security checks) - Rewrite release.yml for Windows releases (W* tags, zip package) - Update update-contributors.yml to trigger on windows branch
107 lines
2.8 KiB
YAML
107 lines
2.8 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'W*' # Windows releases use W prefix (e.g., W1.0.0)
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Windows
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.24.6"
|
|
|
|
- name: Build Binaries
|
|
run: |
|
|
cd cmd/analyze
|
|
go build -ldflags="-s -w" -o analyze.exe .
|
|
cd ../status
|
|
go build -ldflags="-s -w" -o status.exe .
|
|
shell: pwsh
|
|
|
|
- name: Create release package
|
|
run: |
|
|
# Create release directory
|
|
New-Item -ItemType Directory -Force -Path release
|
|
|
|
# Copy binaries
|
|
Copy-Item cmd/analyze/analyze.exe release/
|
|
Copy-Item cmd/status/status.exe release/
|
|
|
|
# Copy PowerShell scripts
|
|
Copy-Item mole.ps1 release/
|
|
Copy-Item install.ps1 release/
|
|
Copy-Item -Recurse bin release/
|
|
Copy-Item -Recurse lib release/
|
|
|
|
# Copy docs
|
|
Copy-Item README.md release/
|
|
Copy-Item LICENSE release/
|
|
|
|
# Create zip
|
|
Compress-Archive -Path release/* -DestinationPath mole-windows.zip
|
|
shell: pwsh
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-release
|
|
path: mole-windows.zip
|
|
retention-days: 5
|
|
|
|
release:
|
|
name: Publish Release
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: windows-release
|
|
|
|
- name: Display downloaded files
|
|
run: ls -la
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: mole-windows.zip
|
|
generate_release_notes: true
|
|
draft: false
|
|
prerelease: false
|
|
name: "Mole for Windows ${{ github.ref_name }}"
|
|
body: |
|
|
## Mole for Windows
|
|
|
|
Windows port of the Mole system maintenance toolkit.
|
|
|
|
### Installation
|
|
|
|
**Quick install:**
|
|
```powershell
|
|
irm https://raw.githubusercontent.com/tw93/Mole/windows/install.ps1 | iex
|
|
```
|
|
|
|
**Manual install:**
|
|
1. Download and extract `mole-windows.zip`
|
|
2. Run `install.ps1`
|
|
|
|
### Features
|
|
- Deep system cleanup (temp files, caches, logs)
|
|
- Smart app uninstaller with leftover detection
|
|
- Disk space analyzer (TUI)
|
|
- System status monitor (TUI)
|
|
- Developer artifact cleanup
|
|
- System optimization
|