1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-05 13:13:48 +00:00
Commit Graph

93 Commits

Author SHA1 Message Date
Bhadra
3bd2869e8d feat: Add Windows package manager publishing infrastructure (#343) (#356)
* feat: Add Windows package manager publishing infrastructure (#343)

- Add comprehensive release build scripts:
  - build-release.ps1: Creates portable ZIP + SHA256 checksums
  - build-exe.ps1: Standalone executable builder (PS2EXE)
  - build-msi.ps1: MSI installer builder (WiX Toolset)

- Add GitHub Actions workflow:
  - Automated builds on version tags
  - Runs tests before building
  - Auto-creates GitHub releases with artifacts

- Add package manager manifests:
  - WinGet: Complete manifests ready for microsoft/winget-pkgs
  - Chocolatey: Full package with install/uninstall scripts
  - Scoop: JSON manifest ready for submission

- Add comprehensive documentation:
  - RELEASE.md: Complete guide for building and publishing
  - Package-specific READMEs with submission instructions
  - ISSUE-343-SUMMARY.md: Quick reference and next steps

Successfully tested: Built mole-1.0.0-x64.zip (5 MB) with SHA256 checksums

Addresses #343

* chore: update contributors [skip ci]

* fix: Support uppercase V and -windows suffix in release workflow

* fix: Remove duplicate parameter definitions in clean, optimize, and purge commands

- bin/clean.ps1: Remove duplicate System, GameMedia, DebugMode, Whitelist params
- bin/optimize.ps1: Remove duplicate DebugMode param
- bin/purge.ps1: Remove duplicate DebugMode and Paths params

These duplicates were causing parser errors in tests.

* fix: Update test regex to match --dry-run format in help text

The help output shows --dry-run (kebab-case) but test was checking for DryRun (PascalCase).
Updated regex to accept both formats.

* fix: Handle Pester 5.x result object properties correctly

Pester 5.x uses different property names (Passed.Count, Failed.Count)
instead of PassedCount, FailedCount. Added fallback logic to support both formats.

* fix: Simplify Pester result parsing with better fallback logic

Since Pester already prints test results, just check for failures
and assume success if we can't parse the result object. This handles
different Pester versions more gracefully.

* feat: Add MSI and EXE builds to release workflow

- Install WiX Toolset for MSI creation
- Install PS2EXE module for standalone EXE
- Build all three formats: ZIP, MSI, EXE
- MSI and EXE builds marked optional (continue-on-error)
- Upload all artifacts to GitHub release
- Update release notes with installation instructions for all formats
- Add SHA256 verification instructions for each format

* fix: Resolve MSI and EXE build failures

MSI build fix:
- Use UTF8 without BOM for temp WXS file to avoid XML parsing errors
- WiX compiler requires clean UTF8 encoding without byte order mark

EXE build fix:
- Remove hashtable iteration that modified collection during enumeration
- Exclude null iconFile parameter from ps2exe params instead of removing it
- Prevents 'Collection was modified' exception

* fix: Properly handle encoding and version format for MSI and EXE builds

MSI fix:
- Use System.IO.File.ReadAllText/WriteAllText for consistent UTF8 without BOM
- Prevents XML parsing errors in WiX compiler

EXE fix:
- Extract numeric version only (strip '-windows' suffix) for ps2exe
- ps2exe requires version in format n.n.n.n (numeric only)
- Fallback to 1.0.0.0 if version parsing fails

* fix: Use WriteAllBytes to ensure no BOM in MSI WXS file

- Convert string to UTF8 bytes manually
- Write bytes directly to file
- This guarantees no byte order mark is added
- Prevents WiX XML parsing error at position 7

* fix: Read WXS source as bytes to completely avoid BOM issues

- Read source file as raw bytes
- Convert bytes to string using UTF8Encoding without BOM
- Replace version in string
- Convert back to bytes and write
- This completely avoids PowerShell's Get-Content BOM handling

* chore: Simplify release workflow - remove MSI build, minimal release notes

- Remove MSI build steps (has persistent BOM/encoding issues)
- Remove WiX Toolset installation
- Simplify release notes to bare minimum
- Focus on ZIP and EXE artifacts only

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-24 00:08:24 +08:00
Bhadra
81c3b97878 fix(ci): update workflows for Windows branch
- 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
2026-01-12 10:53:29 +05:30
Tw93
e84a457c2f Merge branch 'main' into dev 2026-01-10 13:05:53 +08:00
Tw93
ef713afda7 update test 2026-01-10 09:41:17 +08:00
Tw93
cce0afecc5 Merge branch 'dev' of github.com:tw93/Mole into dev 2026-01-09 15:10:36 +08:00
Bhadra
3255fa2451 fix(windows): fix CI function name and purge return type handling
- Fix Test-IsProtectedPath -> Test-ProtectedPath in CI workflow
- Fix purge.ps1 to handle boolean return from Remove-SafeItem
- Add C:\Program Files and C:\Program Files (x86) to ProtectedPaths
2026-01-08 21:37:07 +05:30
Bhadra
230ca07c7f feat(windows): add Windows support Phase 4 - testing and CI
- Pester test suite for PowerShell scripts (Core, Clean, Commands)
- Go tests for TUI tools (analyze, status)
- GitHub Actions workflow for Windows CI
- Build and test automation scripts (test.ps1, build.ps1)
2026-01-08 16:41:03 +05:30
Tw93
d13ca66187 ci: install goimports for enhanced auto-formatting 2026-01-08 14:49:59 +08:00
Matt Kneale
0cc205209c feat: add golangci-lint for Go code quality
- Add .golangci.yml configuration enabling govet, staticcheck, errcheck, gosimple, ineffassign, unused, gofmt, and goimports linters
- Update scripts/check.sh to run golangci-lint with go vet fallback
- Update CI workflow to install golangci-lint in both format and quality jobs
- Add golangci-lint to CONTRIBUTING.md setup instructions

Closes #266
2026-01-08 14:30:54 +08:00
dependabot[bot]
62dc849751 chore(deps): bump stefanzweifel/git-auto-commit-action from 5 to 7
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 5 to 7.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v5...v7)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-05 19:05:06 +00:00
Tw93
9707abc747 fix: use safe login IDs and disable name truncation in SVG 2026-01-05 13:58:35 +08:00
Tw93
c4e87846dd chore: configure commit user, email, author, and force push options for the update contributors workflow. 2026-01-05 13:25:39 +08:00
Tw93
41047f510c ci: Update contributors workflow to fetch new data and adjust avatar margin. 2026-01-05 13:20:36 +08:00
Tw93
71ef9019b0 ci: Update contributors-list action, increase avatar margin, and add noFetch option. 2026-01-05 13:18:06 +08:00
Tw93
73f11d52df docs: Update CONTRIBUTORS.svg image path in README and adjust avatar margin in contributor workflow. 2026-01-05 13:04:43 +08:00
Tw93
5d1837c673 chore: Adjust contributor SVG width, avatar margin, and image source in contributor workflow. 2026-01-05 12:55:00 +08:00
Tw93
6044a22293 fix: update contributors image paths and SVG layout 2026-01-05 11:55:05 +08:00
Tw93
c13a2db75e fix: Adjust contributor name display height, refactor SVG clip path IDs, and correct README image source path. 2026-01-05 11:50:39 +08:00
Tw93
6c524dd044 chore: Clear CONTRIBUTORS.svg content and update the contributor workflow and README. 2026-01-05 11:47:28 +08:00
Tw93
11b9b38538 chore: Increase avatar margin in contributors SVG generation workflow. 2026-01-05 11:38:38 +08:00
Tw93
33837be776 chore: Adjust contributors SVG layout parameters including width, avatar size/margin, and text positioning. 2026-01-05 11:32:07 +08:00
Tw93
542e47081c docs: Increase contributors SVG width in generation workflow and README. 2026-01-05 11:28:51 +08:00
Tw93
114cdc72b0 feat: automate contributor list generation and display in README, and make support section collapsible 2026-01-05 11:16:46 +08:00
Tw93
095921fd24 ci: update BATS_FORMATTER to tap in test workflow. 2026-01-03 13:46:08 +08:00
Tw93
dfffe0b6fb chore: improve CI stability and add edge install support 2026-01-03 13:34:27 +08:00
Tw93
4aef2de0fc refactor: Consolidate and refactor test suite by removing redundant files and simplifying test execution. 2026-01-03 12:04:57 +08:00
Tw93
2462968731 chore: clarify workflow test job name to Unit & Integration Tests 2026-01-02 19:16:52 +08:00
Tw93
d701519310 refactor: simplify pnpm environment variable handling in clean script 2026-01-02 19:10:20 +08:00
Tw93
fdcaa7fa25 Fix workflow errors 2025-12-31 22:54:51 +08:00
Tw93
592f02e6e2 feat: overhaul quality checks and expand test suite for clean and optimize features 2025-12-31 18:13:37 +08:00
Tw93
9aa569cbb6 feat: Enhance clean, optimize, analyze, and status commands, and update security audit documentation. 2025-12-31 16:23:31 +08:00
Tw93
389cae21c9 update 2025-12-30 15:57:01 +08:00
Tw93
b156bf85d9 Merge branch 'main' of github.com:tw93/Mole 2025-12-30 15:55:53 +08:00
Tw93
1ee5ab86c7 feat: add automatic Homebrew Core formula update support 2025-12-30 15:55:21 +08:00
Tw93
af93011b28 feat: add automatic Homebrew Core formula update support 2025-12-30 15:52:32 +08:00
dependabot[bot]
21a921c986 chore(deps): bump actions/download-artifact from 4.1.8 to 7.0.0 (#201) 2025-12-30 07:04:47 +08:00
dependabot[bot]
02eaf3d645 chore(deps): bump actions/upload-artifact from 4.6.0 to 6.0.0 (#200) 2025-12-30 07:04:21 +08:00
Tw93
a7337280a8 feat: package binaries into tar.gz for Homebrew resource
- Add packaging step to create binaries-darwin-{arch}.tar.gz
- These packages will be downloaded by Homebrew resource mechanism
- Enables faster installation without Go dependency
- Separate packages for arm64 and amd64 architectures
2025-12-29 22:40:53 +08:00
Tw93
c94e26d531 ci: Update macOS runners to macos-latest in release workflow. 2025-12-29 20:57:48 +08:00
Tw93
0e6b595d8a chore: Bump version to 1.16.1 and refactor CI/CD to build separate macOS architectures with CGO enabled. 2025-12-29 20:52:13 +08:00
Tw93
af61748977 release binaries via GH releases and update installer fallback 2025-12-29 20:23:11 +08:00
dependabot[bot]
69d92566a1 chore(deps): bump actions/cache from 4.3.0 to 5.0.1 (#191)
Bumps [actions/cache](https://github.com/actions/cache) from 4.3.0 to 5.0.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](0057852bfa...9255dc7a25)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-29 16:56:31 +08:00
dependabot[bot]
afc0f7b410 chore(deps): bump actions/checkout from 4.3.1 to 6.0.1 (#192)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.3.1 to 6.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](34e114876b...8e8c483db8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-29 16:56:18 +08:00
dependabot[bot]
db220746dc chore(deps): bump actions/setup-go from 5.6.0 to 6.1.0 (#194)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.6.0 to 6.1.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](40f1582b24...4dc6199c7b)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-29 16:55:51 +08:00
Tw93
7af6b39875 chore(ci): pin actions to SHAs and add dependabot for gomod 2025-12-29 16:53:51 +08:00
Aman Thanvi
600afbbee8 security(ci): pin mislav/bump-homebrew-formula-action to SHA (#187)
* security(ci): pin third-party GitHub Action

Pin mislav/bump-homebrew-formula-action to a full commit SHA and add Dependabot updates for GitHub Actions.

* ci: fix checkout for fork PRs

Use merge ref for forked pull requests and skip auto-commit when the PR comes from a fork.
2025-12-29 16:50:47 +08:00
Tw93
139b66d1bb ci: Exclude bin/optimize.sh from secret detection in the CI workflow. 2025-12-27 10:24:17 +08:00
Tw93
e363a67a10 feat: optimize update checks for speed and refactor update flow to prioritize Mole with manual tips for other updates. 2025-12-17 11:55:25 +08:00
Tw93
648f49d4d2 fix: Add safety checks for critical system components during cleaning and disable blank issue creation 2025-12-12 20:17:06 +08:00
Tw93
b6b9f55d74 adjust update manager test directory structure, and improve release workflow for binary updates 2025-12-12 15:50:41 +08:00