99 - main
1010
1111jobs :
12- # ── Decide whether this push should trigger a release ──────────────────────
13- # A step's own exit code does NOT skip later steps in the same job — only an
14- # `if:` on those later steps (or a job-level `if:`) does. This job exists so
15- # the entire build/release job can be gated with one job-level `if:` instead.
1612 gate :
1713 name : Check commit message
1814 runs-on : windows-latest
1915 outputs :
2016 should_release : ${{ steps.decide.outputs.should_release }}
2117 version : ${{ steps.decide.outputs.version }}
18+ is_prerelease : ${{ steps.decide.outputs.is_prerelease }}
2219 steps :
2320 - name : Checkout repo
2421 uses : actions/checkout@v4
@@ -30,37 +27,38 @@ jobs:
3027 COMMIT_MSG=$(git log -1 --pretty=%B)
3128 echo "Commit message: $COMMIT_MSG"
3229
33- if echo "$COMMIT_MSG" | grep -qiE 'testing|dev|development'; then
34- echo "Commit marked Testing/Dev/Development — skipping release."
35- echo "should_release=false" >> $GITHUB_OUTPUT
36- exit 0
37- fi
38-
3930 VERSION=$(echo "$COMMIT_MSG" | grep -o 'V[0-9]\+\.[0-9]\+\.[0-9]\+' || true)
4031 if [ -z "$VERSION" ]; then
4132 echo "No version found in commit message — skipping release."
4233 echo "should_release=false" >> $GITHUB_OUTPUT
4334 exit 0
4435 fi
4536
46- echo "Releasing $VERSION"
37+ if echo "$COMMIT_MSG" | grep -qiE 'testing|dev|development'; then
38+ echo "Commit marked Testing/Dev/Development — releasing $VERSION as a pre-release."
39+ echo "is_prerelease=true" >> $GITHUB_OUTPUT
40+ else
41+ echo "Releasing $VERSION as the latest stable release."
42+ echo "is_prerelease=false" >> $GITHUB_OUTPUT
43+ fi
44+
4745 echo "should_release=true" >> $GITHUB_OUTPUT
4846 echo "version=$VERSION" >> $GITHUB_OUTPUT
4947
50- # ── Build and publish, only when the gate says so ───────────────────────────
5148 release :
5249 name : Build & Release
5350 needs : gate
5451 if : needs.gate.outputs.should_release == 'true'
5552 runs-on : windows-latest
5653 permissions :
5754 contents : write
55+ env :
56+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5857
5958 steps :
6059 - name : Checkout repo
6160 uses : actions/checkout@v4
6261
63- # ── Inject version into all three .csproj files ───────────────────────
6462 - name : Set version in .csproj files
6563 shell : pwsh
6664 run : |
@@ -72,16 +70,12 @@ jobs:
7270 Write-Host "Set <Version> to $ver in $path"
7371 }
7472
75- # ── Setup .NET ──────────────────────────────────────────────────────────
7673 - name : Setup .NET
7774 uses : actions/setup-dotnet@v4
7875 with :
7976 dotnet-version : " 9.0.x"
8077
81- # ── Build GUI — all three targets ─────────────────────────────────────
82- # Note: the GUI is now WinUI 3 (Windows App SDK), which does not support
83- # PublishSingleFile — it ships as a self-contained folder, zipped below.
84- - name : Build GUI win-x64
78+ - name : Publish GUI win-x64
8579 shell : pwsh
8680 run : |
8781 dotnet publish QuickA-Cleanup-GUI\QuickA-Cleanup-GUI.csproj `
9185 -p:WindowsPackageType=None `
9286 -p:DebugType=None `
9387 -p:DebugSymbols=false `
94- -o publish/gui/win -x64
88+ -o publish/gui-x64
9589
96- - name : Build GUI win-x86
90+ - name : Publish GUI win-x86
9791 shell : pwsh
9892 run : |
9993 dotnet publish QuickA-Cleanup-GUI\QuickA-Cleanup-GUI.csproj `
10599 -p:DebugSymbols=false `
106100 -o publish/gui/win-x86
107101
108- - name : Build GUI win-arm64
102+ - name : Publish GUI win-arm64
109103 shell : pwsh
110104 run : |
111105 dotnet publish QuickA-Cleanup-GUI\QuickA-Cleanup-GUI.csproj `
@@ -117,7 +111,6 @@ jobs:
117111 -p:DebugSymbols=false `
118112 -o publish/gui/win-arm64
119113
120- # ── Build CLI — all three targets ─────────────────────────────────────
121114 - name : Build CLI win-x64
122115 shell : pwsh
123116 run : |
@@ -160,56 +153,105 @@ jobs:
160153 -p:DebugSymbols=false `
161154 -o publish/cli/win-arm64
162155
163- # ── Package binaries ────────────────────────────────────────────────────
164- # GUI (WinUI 3) ships as a zipped self-contained folder per architecture.
165- # CLI stays a single-file .exe per architecture, as before.
166- - name : Package binaries
156+ - name : Package zips and CLI exes
167157 shell : pwsh
168158 run : |
169159 $v = "${{ needs.gate.outputs.version }}"
170160
171- Compress-Archive -Path publish/gui/win-x64/* -DestinationPath "QuickA-Cleanup-GUI-${v}-win-x64.zip"
172161 Compress-Archive -Path publish/gui/win-x86/* -DestinationPath "QuickA-Cleanup-GUI-${v}-win-x86.zip"
173162 Compress-Archive -Path publish/gui/win-arm64/* -DestinationPath "QuickA-Cleanup-GUI-${v}-win-arm64.zip"
174163
175164 Copy-Item publish/cli/win-x64/QuickA-Cleanup-CLI.exe "QuickA-Cleanup-CLI-${v}-win-x64.exe"
176165 Copy-Item publish/cli/win-x86/QuickA-Cleanup-CLI.exe "QuickA-Cleanup-CLI-${v}-win-x86.exe"
177166 Copy-Item publish/cli/win-arm64/QuickA-Cleanup-CLI.exe "QuickA-Cleanup-CLI-${v}-win-arm64.exe"
178167
179- # ── Create GitHub Release ───────────────────────────────────────────────
180- - name : Create GitHub Release
181- uses : ncipollo/release-action@v1
182- with :
183- tag : ${{ needs.gate.outputs.version }}
184- name : " QuickA-Cleanup"
185- body : |
186- ## QuickA-Cleanup ${{ needs.gate.outputs.version }}
187- Smart Quick Access Navigation Pane cleaner for Windows Explorer.
188-
189- ---
190-
191- ## ✨ Socials & Stars
192- [](https://rb.ash1421.com/discord)
193- [](https://github.com/Ash1421/QuickA-Cleanup/stargazers)
194-
195- ## 📦 Repository Info
196- [](https://github.com/Ash1421/QuickA-Cleanup/releases/tag/${{ needs.gate.outputs.version }})
197- [](https://github.com/Ash1421/QuickA-Cleanup/releases/latest)
198- [](https://www.codefactor.io/repository/github/ash1421/QuickA-Cleanup)
199- [](https://github.com/Ash1421/QuickA-Cleanup/releases)
200- [](https://github.com/Ash1421/QuickA-Cleanup/releases/latest)
201- [](https://github.com/Ash1421/QuickA-Cleanup/issues)
202- [](https://github.com/Ash1421/QuickA-Cleanup/issues?q=is:closed)
203- [](https://github.com/Ash1421/QuickA-Cleanup/issues/new)
204-
205- ## 📜 License
206- [](./LICENSE)
207-
208- artifacts : |
209- QuickA-Cleanup-GUI-${{ needs.gate.outputs.version }}-win-x64.zip
210- QuickA-Cleanup-GUI-${{ needs.gate.outputs.version }}-win-x86.zip
211- QuickA-Cleanup-GUI-${{ needs.gate.outputs.version }}-win-arm64.zip
212- QuickA-Cleanup-CLI-${{ needs.gate.outputs.version }}-win-x64.exe
213- QuickA-Cleanup-CLI-${{ needs.gate.outputs.version }}-win-x86.exe
214- QuickA-Cleanup-CLI-${{ needs.gate.outputs.version }}-win-arm64.exe
215- makeLatest : true
168+ - name : Install vpk
169+ run : dotnet tool install -g vpk
170+
171+ - name : Download previous Velopack release
172+ shell : pwsh
173+ continue-on-error : true
174+ run : |
175+ vpk download github --repoUrl https://github.com/${{ github.repository }} --channel win-x64 --token ${{ secrets.GITHUB_TOKEN }}
176+
177+ - name : Pack Velopack release (win-x64)
178+ shell : pwsh
179+ run : |
180+ $ver = "${{ needs.gate.outputs.version }}" -replace '^V',''
181+ vpk pack `
182+ --packId QuickA-Cleanup `
183+ --packVersion $ver `
184+ --packDir publish\gui-x64 `
185+ --mainExe QuickA-Cleanup-GUI.exe `
186+ --packTitle "QuickA-Cleanup" `
187+ --channel win-x64 `
188+ --runtime win-x64
189+
190+ - name : Upload Velopack release to GitHub
191+ shell : pwsh
192+ run : |
193+ vpk upload github `
194+ --repoUrl https://github.com/${{ github.repository }} `
195+ --channel win-x64 `
196+ --token ${{ secrets.GITHUB_TOKEN }} `
197+ --publish `
198+ --releaseName "QuickA-Cleanup ${{ needs.gate.outputs.version }}" `
199+ --tag ${{ needs.gate.outputs.version }}
200+
201+ - name : Attach zips/CLI exes to the release
202+ shell : pwsh
203+ run : |
204+ $v = "${{ needs.gate.outputs.version }}"
205+ gh release upload $v `
206+ "QuickA-Cleanup-GUI-${v}-win-x86.zip" `
207+ "QuickA-Cleanup-GUI-${v}-win-arm64.zip" `
208+ "QuickA-Cleanup-CLI-${v}-win-x64.exe" `
209+ "QuickA-Cleanup-CLI-${v}-win-x86.exe" `
210+ "QuickA-Cleanup-CLI-${v}-win-arm64.exe" `
211+ --clobber
212+
213+ - name : Set release notes
214+ shell : pwsh
215+ run : |
216+ $v = "${{ needs.gate.outputs.version }}"
217+ $isPrerelease = "${{ needs.gate.outputs.is_prerelease }}" -eq "true"
218+
219+ $warning = ""
220+ $title = "QuickA-Cleanup $v"
221+ if ($isPrerelease) {
222+ $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"
223+ $title = "QuickA-Cleanup $v (Testing)"
224+ }
225+
226+ @"
227+ $warning## QuickA-Cleanup $v
228+ Smart Quick Access Navigation Pane cleaner for Windows Explorer.
229+
230+ The GUI (win-x64) installs via the QuickA-Cleanup-Setup.exe below, and will auto-update itself from here on.
231+ win-x86 / win-arm64 GUI builds and all CLI builds are portable — extract/run directly, no installer.
232+
233+ ---
234+
235+ ## ✨ Socials & Stars
236+ [](https://rb.ash1421.com/discord)
237+ [](https://github.com/Ash1421/QuickA-Cleanup/stargazers)
238+
239+ ## 📦 Repository Info
240+ [](https://github.com/Ash1421/QuickA-Cleanup/releases/tag/$v)
241+ [](https://github.com/Ash1421/QuickA-Cleanup/releases/latest)
242+ [](https://www.codefactor.io/repository/github/ash1421/QuickA-Cleanup)
243+ [](https://github.com/Ash1421/QuickA-Cleanup/releases)
244+ [](https://github.com/Ash1421/QuickA-Cleanup/releases/latest)
245+ [](https://github.com/Ash1421/QuickA-Cleanup/issues)
246+ [](https://github.com/Ash1421/QuickA-Cleanup/issues?q=is:closed)
247+ [](https://github.com/Ash1421/QuickA-Cleanup/issues/new)
248+
249+ ## 📜 License
250+ [](./LICENSE)
251+ "@ | Out-File -FilePath notes.md -Encoding utf8
252+
253+ if ($isPrerelease) {
254+ gh release edit $v --prerelease --latest=false --notes-file notes.md --title $title
255+ } else {
256+ gh release edit $v --latest --notes-file notes.md --title $title
257+ }
0 commit comments