Skip to content

Testing - V3.1.1

Testing - V3.1.1 #8

name: Automated Release
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
on:
push:
branches:
- main
jobs:
gate:
name: Check commit message
runs-on: windows-latest
outputs:
should_release: ${{ steps.decide.outputs.should_release }}
version: ${{ steps.decide.outputs.version }}
is_prerelease: ${{ steps.decide.outputs.is_prerelease }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Decide whether to release
id: decide
shell: bash
run: |
COMMIT_MSG=$(git log -1 --pretty=%B)
echo "Commit message: $COMMIT_MSG"
VERSION=$(echo "$COMMIT_MSG" | grep -o 'V[0-9]\+\.[0-9]\+\.[0-9]\+' || true)
if [ -z "$VERSION" ]; then
echo "No version found in commit message — skipping release."
echo "should_release=false" >> $GITHUB_OUTPUT
exit 0
fi
if echo "$COMMIT_MSG" | grep -qiE 'testing|dev|development'; then
echo "Commit marked Testing/Dev/Development — releasing $VERSION as a pre-release."
echo "is_prerelease=true" >> $GITHUB_OUTPUT
else
echo "Releasing $VERSION as the latest stable release."
echo "is_prerelease=false" >> $GITHUB_OUTPUT
fi
echo "should_release=true" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
release:
name: Build & Release
needs: gate
if: needs.gate.outputs.should_release == 'true'
runs-on: windows-latest
permissions:
contents: write
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set version in .csproj files
shell: pwsh
run: |
$ver = "${{ needs.gate.outputs.version }}" -replace '^V',''
foreach ($path in @('Core\Core.csproj', 'QuickA-Cleanup-GUI\QuickA-Cleanup-GUI.csproj', 'QuickA-Cleanup-CLI\QuickA-Cleanup-CLI.csproj')) {
$content = Get-Content $path -Raw
$content = $content -replace '<Version>.*?</Version>', "<Version>$ver</Version>"
Set-Content $path $content
Write-Host "Set <Version> to $ver in $path"
}
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.0.x"
- name: Publish GUI win-x64
shell: pwsh
run: |
dotnet publish QuickA-Cleanup-GUI\QuickA-Cleanup-GUI.csproj `
-c Release `
-r win-x64 `
--self-contained true `
-p:WindowsPackageType=None `
-p:DebugType=None `
-p:DebugSymbols=false `
-o publish/gui-x64
- name: Publish GUI win-x86
shell: pwsh
run: |
dotnet publish QuickA-Cleanup-GUI\QuickA-Cleanup-GUI.csproj `
-c Release `
-r win-x86 `
--self-contained true `
-p:WindowsPackageType=None `
-p:DebugType=None `
-p:DebugSymbols=false `
-o publish/gui/win-x86
- name: Publish GUI win-arm64
shell: pwsh
run: |
dotnet publish QuickA-Cleanup-GUI\QuickA-Cleanup-GUI.csproj `
-c Release `
-r win-arm64 `
--self-contained true `
-p:WindowsPackageType=None `
-p:DebugType=None `
-p:DebugSymbols=false `
-o publish/gui/win-arm64
- name: Build CLI win-x64
shell: pwsh
run: |
dotnet publish QuickA-Cleanup-CLI\QuickA-Cleanup-CLI.csproj `
-c Release `
-r win-x64 `
--self-contained true `
-p:PublishSingleFile=true `
-p:IncludeNativeLibrariesForSelfExtract=true `
-p:PublishTrimmed=true `
-p:DebugType=None `
-p:DebugSymbols=false `
-o publish/cli/win-x64
- name: Build CLI win-x86
shell: pwsh
run: |
dotnet publish QuickA-Cleanup-CLI\QuickA-Cleanup-CLI.csproj `
-c Release `
-r win-x86 `
--self-contained true `
-p:PublishSingleFile=true `
-p:IncludeNativeLibrariesForSelfExtract=true `
-p:PublishTrimmed=true `
-p:DebugType=None `
-p:DebugSymbols=false `
-o publish/cli/win-x86
- name: Build CLI win-arm64
shell: pwsh
run: |
dotnet publish QuickA-Cleanup-CLI\QuickA-Cleanup-CLI.csproj `
-c Release `
-r win-arm64 `
--self-contained true `
-p:PublishSingleFile=true `
-p:IncludeNativeLibrariesForSelfExtract=true `
-p:PublishTrimmed=true `
-p:DebugType=None `
-p:DebugSymbols=false `
-o publish/cli/win-arm64
- name: Package zips and CLI exes
shell: pwsh
run: |
$v = "${{ needs.gate.outputs.version }}"
Compress-Archive -Path publish/gui/win-x86/* -DestinationPath "QuickA-Cleanup-GUI-${v}-win-x86.zip"
Compress-Archive -Path publish/gui/win-arm64/* -DestinationPath "QuickA-Cleanup-GUI-${v}-win-arm64.zip"
Copy-Item publish/cli/win-x64/QuickA-Cleanup-CLI.exe "QuickA-Cleanup-CLI-${v}-win-x64.exe"
Copy-Item publish/cli/win-x86/QuickA-Cleanup-CLI.exe "QuickA-Cleanup-CLI-${v}-win-x86.exe"
Copy-Item publish/cli/win-arm64/QuickA-Cleanup-CLI.exe "QuickA-Cleanup-CLI-${v}-win-arm64.exe"
- name: Install vpk
run: dotnet tool install -g vpk
- name: Download previous Velopack release
shell: pwsh
continue-on-error: true
run: |
vpk download github --repoUrl https://github.com/${{ github.repository }} --channel win-x64 --token ${{ secrets.GITHUB_TOKEN }}
- name: Pack Velopack release (win-x64)
shell: pwsh
run: |
$ver = "${{ needs.gate.outputs.version }}" -replace '^V',''
vpk pack `
--packId QuickA-Cleanup `
--packVersion $ver `
--packDir publish\gui-x64 `
--mainExe QuickA-Cleanup-GUI.exe `
--packTitle "QuickA-Cleanup" `
--channel win-x64 `
--runtime win-x64
- name: Upload Velopack release to GitHub
shell: pwsh
run: |
vpk upload github `
--repoUrl https://github.com/${{ github.repository }} `
--channel win-x64 `
--token ${{ secrets.GITHUB_TOKEN }} `
--publish `
--releaseName "QuickA-Cleanup ${{ needs.gate.outputs.version }}" `
--tag ${{ needs.gate.outputs.version }}
- name: Attach zips/CLI exes to the release
shell: pwsh
run: |
$v = "${{ needs.gate.outputs.version }}"
gh release upload $v `
"QuickA-Cleanup-GUI-${v}-win-x86.zip" `
"QuickA-Cleanup-GUI-${v}-win-arm64.zip" `
"QuickA-Cleanup-CLI-${v}-win-x64.exe" `
"QuickA-Cleanup-CLI-${v}-win-x86.exe" `
"QuickA-Cleanup-CLI-${v}-win-arm64.exe" `
--clobber
- name: Set release notes
shell: pwsh
run: |
$v = "${{ needs.gate.outputs.version }}"
$isPrerelease = "${{ needs.gate.outputs.is_prerelease }}" -eq "true"
$warning = ""
$title = "QuickA-Cleanup $v"
if ($isPrerelease) {
$warning = "> ⚠️ **This is a testing/development build, not production-ready.** It may be unstable, incomplete, or contain bugs. Auto-update will not offer this to regular users on the stable channel.`n`n"
$title = "QuickA-Cleanup $v (Testing)"
}
@"
$warning## QuickA-Cleanup $v
Smart Quick Access Navigation Pane cleaner for Windows Explorer.
The GUI (win-x64) installs via the QuickA-Cleanup-Setup.exe below, and will auto-update itself from here on.
win-x86 / win-arm64 GUI builds and all CLI builds are portable — extract/run directly, no installer.
---
## ✨ Socials & Stars
[![Discord](https://img.shields.io/badge/Discord-Server%20Invite-7289DA?style=for-the-badge&logo=discord&logoColor=white&labelColor=1c1917&color=blueviolet)](https://rb.ash1421.com/discord)
[![GitHub Stars](https://img.shields.io/github/stars/Ash1421/QuickA-Cleanup?style=for-the-badge&logo=github&logoColor=white&labelColor=1c1917&color=gold)](https://github.com/Ash1421/QuickA-Cleanup/stargazers)
## 📦 Repository Info
[![Version](https://img.shields.io/badge/Version-$v-6829B1?style=for-the-badge&label=Version&logo=github&logoColor=white&labelColor=1c1917)](https://github.com/Ash1421/QuickA-Cleanup/releases/tag/$v)
[![Latest Release](https://img.shields.io/github/v/release/Ash1421/QuickA-Cleanup?style=for-the-badge&label=Latest%20Version&logo=github&logoColor=white&labelColor=1c1917&color=6829B1)](https://github.com/Ash1421/QuickA-Cleanup/releases/latest)
[![CodeFactor](https://img.shields.io/codefactor/grade/github/ash1421/QuickA-Cleanup?style=for-the-badge&logo=codefactor&logoColor=white&labelColor=1c1917&color=6829B1)](https://www.codefactor.io/repository/github/ash1421/QuickA-Cleanup)
[![Total Downloads](https://img.shields.io/github/downloads/Ash1421/QuickA-Cleanup/total?style=for-the-badge&logo=github&logoColor=white&labelColor=1c1917&color=6829B1&label=Total%20Downloads)](https://github.com/Ash1421/QuickA-Cleanup/releases)
[![Downloads @ Latest](https://img.shields.io/github/downloads/Ash1421/QuickA-Cleanup/latest/total?style=for-the-badge&logo=github&logoColor=white&labelColor=1c1917&color=6829B1&label=Downloads%20%40%20Latest)](https://github.com/Ash1421/QuickA-Cleanup/releases/latest)
[![Open Issues](https://img.shields.io/github/issues/Ash1421/QuickA-Cleanup/open?style=for-the-badge&labelColor=1c1917&logo=github&logoColor=white)](https://github.com/Ash1421/QuickA-Cleanup/issues)
[![Closed Issues](https://img.shields.io/github/issues-closed/Ash1421/QuickA-Cleanup/closed?style=for-the-badge&color=red&labelColor=1c1917&logo=github&logoColor=white)](https://github.com/Ash1421/QuickA-Cleanup/issues?q=is:closed)
[![New Issue](https://img.shields.io/badge/Open%20A%20New-Issue-orange?style=for-the-badge&labelColor=1c1917&logo=github&logoColor=white)](https://github.com/Ash1421/QuickA-Cleanup/issues/new)
## 📜 License
[![License: GPL v3.0](https://img.shields.io/badge/License-GPL%20v3.0-6829B1.svg?style=for-the-badge&labelColor=1c1917&logo=gnu&logoColor=white)](./LICENSE)
"@ | Out-File -FilePath notes.md -Encoding utf8
if ($isPrerelease) {
gh release edit $v --prerelease --latest=false --notes-file notes.md --title $title
} else {
gh release edit $v --latest --notes-file notes.md --title $title
}