diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72fe916..8f24c0b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,6 +106,19 @@ jobs: - name: Package & publish (x64 + arm64) run: npx electron-builder --mac --x64 --arm64 --publish always -c.publish.releaseType=${{ steps.channel.outputs.release_type }} + # electron-builder publishes the release with an empty body, so every + # release before v1.5.0 shipped with no notes. Fill it from CHANGELOG.md. + - name: Set release notes from CHANGELOG + if: startsWith(github.ref, 'refs/tags/') + run: | + # A prerelease tag (v1.3.0-rc.1) has no CHANGELOG section of its own, + # so a miss here leaves the notes alone rather than failing the release. + if node scripts/changelog-section.js "${GITHUB_REF_NAME}" > "$RUNNER_TEMP/notes.md"; then + gh release edit "${GITHUB_REF_NAME}" --notes-file "$RUNNER_TEMP/notes.md" + else + echo "No CHANGELOG section for ${GITHUB_REF_NAME}; leaving the release notes as they are." + fi + - name: Upload artifacts uses: actions/upload-artifact@v7 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 47cd4cf..1582399 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,12 +10,20 @@ Downloads for every release are on the ## [Unreleased] +## [1.5.0] - 2026-09-07 + ### Changed - The PDF viewer is no longer part of the initial bundle — it loads the first time you actually open a PDF, so the app starts faster for everyone who never previews one. - The app icon fills more of its canvas, so it reads better at Dock and Finder sizes. +### Fixed + +- A file that fails to move to the Trash is no longer counted as tossed. The failure + was swallowed, so the file stayed on disk while the summary claimed it was gone — + now the session leaves it in place and tells you what happened. + ## [1.4.0] - 2026-08-20 ### Fixed @@ -70,7 +78,8 @@ Downloads for every release are on the left to toss, right to keep. Previews for images, PDFs, plain-text formats and video; `Cmd+Z` undoes any decision; tossed files go to the system Trash. -[Unreleased]: https://github.com/killerwolf/QuickToss/compare/v1.4.0...HEAD +[Unreleased]: https://github.com/killerwolf/QuickToss/compare/v1.5.0...HEAD +[1.5.0]: https://github.com/killerwolf/QuickToss/compare/v1.4.0...v1.5.0 [1.4.0]: https://github.com/killerwolf/QuickToss/compare/v1.3.0...v1.4.0 [1.3.0]: https://github.com/killerwolf/QuickToss/compare/v1.2.0...v1.3.0 [1.2.0]: https://github.com/killerwolf/QuickToss/compare/v1.1.0...v1.2.0 diff --git a/package-lock.json b/package-lock.json index 77b1ade..dc1548e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "quicktoss", - "version": "1.4.0", + "version": "1.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "quicktoss", - "version": "1.4.0", + "version": "1.5.0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 765885a..e5acc63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "quicktoss", - "version": "1.4.0", + "version": "1.5.0", "description": "Clean out a cluttered folder the way you'd swipe through a dating app: one file at a time, left to toss, right to keep.", "main": "dist/main.js", "homepage": "https://github.com/killerwolf/QuickToss", diff --git a/scripts/changelog-section.js b/scripts/changelog-section.js new file mode 100644 index 0000000..6206430 --- /dev/null +++ b/scripts/changelog-section.js @@ -0,0 +1,36 @@ +// Prints one version's section from CHANGELOG.md, for use as GitHub release +// notes. Exists because electron-builder publishes releases with an empty +// body — every release before v1.5.0 shipped with no notes at all. +// +// Usage: node scripts/changelog-section.js 1.5.0 +const fs = require("node:fs"); +const path = require("node:path"); + +const version = (process.argv[2] || "").replace(/^v/, ""); +if (!version) { + console.error("usage: changelog-section.js "); + process.exit(1); +} + +const changelog = fs.readFileSync(path.join(__dirname, "..", "CHANGELOG.md"), "utf8"); +const lines = changelog.split("\n"); + +// Section runs from its own "## [x.y.z]" heading to the next "## " heading. +const startsSection = (line) => /^## /.test(line); +const start = lines.findIndex((line) => line.startsWith(`## [${version}]`)); + +if (start === -1) { + console.error(`No section for ${version} in CHANGELOG.md`); + process.exit(1); +} + +const rest = lines.slice(start + 1); +const end = rest.findIndex(startsSection); +const body = (end === -1 ? rest : rest.slice(0, end)).join("\n").trim(); + +if (!body) { + console.error(`The section for ${version} is empty`); + process.exit(1); +} + +console.log(body);