Testing - V3.1.1 #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| [](https://rb.ash1421.com/discord) | |
| [](https://github.com/Ash1421/QuickA-Cleanup/stargazers) | |
| ## 📦 Repository Info | |
| [](https://github.com/Ash1421/QuickA-Cleanup/releases/tag/$v) | |
| [](https://github.com/Ash1421/QuickA-Cleanup/releases/latest) | |
| [](https://www.codefactor.io/repository/github/ash1421/QuickA-Cleanup) | |
| [](https://github.com/Ash1421/QuickA-Cleanup/releases) | |
| [](https://github.com/Ash1421/QuickA-Cleanup/releases/latest) | |
| [](https://github.com/Ash1421/QuickA-Cleanup/issues) | |
| [](https://github.com/Ash1421/QuickA-Cleanup/issues?q=is:closed) | |
| [](https://github.com/Ash1421/QuickA-Cleanup/issues/new) | |
| ## 📜 License | |
| [](./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 | |
| } |