Skip to content

Commit 806d056

Browse files
committed
chore: bump version to v1.3.3
1 parent 43c8deb commit 806d056

3 files changed

Lines changed: 109 additions & 61 deletions

File tree

Lines changed: 34 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,67 @@
1-
name: Build and Release
1+
name: Build/release
22

33
on:
44
push:
55
tags:
66
- 'v*'
77

8+
permissions:
9+
contents: write
10+
811
jobs:
9-
build:
10-
runs-on: ${{ matrix.os }}
11-
12+
release:
1213
strategy:
1314
matrix:
1415
include:
1516
- os: macos-latest
1617
platform: mac
17-
arch: arm64
18-
- os: windows-latest
19-
platform: win
20-
arch: x64
2118
- os: ubuntu-latest
2219
platform: linux
23-
arch: x64
20+
- os: windows-latest
21+
platform: win
22+
23+
runs-on: ${{ matrix.os }}
2424

2525
steps:
26-
- name: Checkout code
26+
- name: Check out Git repository
2727
uses: actions/checkout@v4
2828

29-
- name: Setup Node.js
29+
- name: Install Node.js
3030
uses: actions/setup-node@v4
3131
with:
32-
node-version: '20'
33-
cache: 'npm'
32+
node-version: 20
3433

3534
- name: Install dependencies
3635
run: npm ci
3736

38-
- name: Build and publish
37+
- name: Build Electron app
3938
env:
4039
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
run: npm run publish-${{ matrix.platform }}
40+
run: |
41+
if [ "${{ matrix.platform }}" = "mac" ]; then
42+
npm run build-mac
43+
elif [ "${{ matrix.platform }}" = "linux" ]; then
44+
npm run build-linux
45+
elif [ "${{ matrix.platform }}" = "win" ]; then
46+
npm run build-win
47+
fi
48+
shell: bash
4249

4350
- name: Upload artifacts
4451
uses: actions/upload-artifact@v4
4552
with:
46-
name: ${{ matrix.platform }}-${{ matrix.arch }}
47-
path: dist/*
53+
name: dist-${{ matrix.platform }}
54+
path: dist/
4855

49-
create-release:
50-
needs: build
51-
runs-on: ubuntu-latest
52-
permissions:
53-
contents: write
54-
55-
steps:
56-
- name: Checkout code
57-
uses: actions/checkout@v4
56+
- name: Release
57+
uses: softprops/action-gh-release@v1
58+
if: startsWith(github.ref, 'refs/tags/')
5859
with:
59-
fetch-depth: 0
60-
61-
- name: Download all artifacts
62-
uses: actions/download-artifact@v4
63-
with:
64-
path: dist
65-
66-
- name: Get tag message
67-
id: tag_message
68-
run: |
69-
TAG_MESSAGE=$(git tag -l --format='%(contents)' ${{ github.ref_name }})
70-
echo "TAG_MESSAGE<<EOF" >> $GITHUB_OUTPUT
71-
echo "$TAG_MESSAGE" >> $GITHUB_OUTPUT
72-
echo "EOF" >> $GITHUB_OUTPUT
73-
74-
- name: Create Release
75-
uses: softprops/action-gh-release@v2
76-
with:
77-
body: |
78-
${{ steps.tag_message.outputs.TAG_MESSAGE }}
79-
80-
## Downloads
81-
82-
- 🍎 **macOS**: `KHM-Tools-*-mac-arm64.dmg`
83-
- 🪟 **Windows**: `KHM-Tools-*-win-x64.exe`
84-
- 🐧 **Linux**: `KHM-Tools-*-linux.AppImage`
8560
files: |
86-
dist/**/*.dmg
87-
dist/**/*.zip
88-
dist/**/*.exe
89-
dist/**/*.AppImage
90-
dist/**/*.deb
91-
draft: false
92-
prerelease: false
93-
env:
94-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
dist/*.dmg
62+
dist/*.zip
63+
dist/*.exe
64+
dist/*.AppImage
65+
dist/*.deb
66+
dist/*.yml
67+
token: ${{ secrets.GITHUB_TOKEN }}

RELEASE_NOTES_v1.3.3.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# KHM Tools v1.3.3 Release Notes 🚀
2+
3+
📋 Changelog 🛠️ Technical Improvements - 📦 Build System Enhancement - Optimized Electron builder configuration with more selective file inclusion - 🔄 Auto-Updater Reliability - Added fallback handling for electron-updater dependency issues 🔧 Bug Fixes & System Improvements Build & Deployment - 🐛 Build File Optimization - Refined package.json files array to include only necessary dependencies and exclude development files - 🔄 Dependency Management - Ensured electron-updater and electron-log are properly included in builds - 🎯 File Exclusion Cleanup - Removed redundant node_modules exclusion and added specific exclusions for scripts and markdown files Auto-Updater Stability - 💾 Graceful Fallback - Auto-updater now handles missing electron-updater dependency gracefully without crashing - 🔒 Error Handling - Added comprehensive try-catch blocks to prevent updater initialization failures - �� Enhanced Logging - Improved error reporting when auto-updater is unavailable 🛠️ Technical Improvements Application Packaging - 🔄 Build Optimization - Streamlined build process by explicitly including only required node_modules - 🎯 File Size Reduction - Excluded unnecessary development files from final package - 📝 Dependency Safety - Added safe initialization patterns for optional dependencies --- 📥 Download Get the latest version from the https://github.com/advenimus/khmtools/releases/tag/v1.3.3 Platform Downloads: - 🍎 macOS: KHM-Tools-1.3.3-mac-arm64.dmg - 🪟 Windows: KHM-Tools-1.3.3-win-x64.exe - 🐧 Linux: KHM-Tools-1.3.3-linux.AppImage 🔄 Upgrade Notes - This release focuses on build stability and dependency management - Auto-updater functionality is now more resilient to packaging issues - No breaking changes or configuration migrations required - New README.md file added for better documentation

scripts/release.js

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,70 @@ async function buildViaGitHub(version) {
277277
}
278278
}
279279

280+
async function getMainAction() {
281+
log('\n🎯 Main Action', 'bright');
282+
log('What would you like to do?', 'cyan');
283+
console.log(' 1) Create new release');
284+
console.log(' 2) Delete existing tag');
285+
286+
const choice = await question('\nSelect (1-2): ');
287+
return choice === '2' ? 'delete' : 'release';
288+
}
289+
290+
async function deleteTag() {
291+
log('\n🗑️ Delete Tag', 'bright');
292+
293+
// Show existing tags
294+
try {
295+
const tags = execCommand('git tag -l', true);
296+
if (tags) {
297+
log('\n📋 Existing tags:', 'cyan');
298+
tags.split('\n').forEach(tag => {
299+
if (tag.trim()) {
300+
console.log(` ${tag}`);
301+
}
302+
});
303+
} else {
304+
log('\n⚠️ No tags found in repository', 'yellow');
305+
}
306+
} catch (error) {
307+
log('\n⚠️ Could not fetch tags', 'yellow');
308+
}
309+
310+
const tagName = await question('\nEnter tag name to delete (e.g., v1.3.3): ');
311+
312+
if (!tagName) {
313+
log('❌ No tag name provided', 'red');
314+
return;
315+
}
316+
317+
// Confirm deletion
318+
const confirm = await question(`\n⚠️ Are you sure you want to delete tag '${tagName}' locally and remotely? (y/N): `);
319+
320+
if (confirm.toLowerCase() !== 'y') {
321+
log('Aborted.', 'yellow');
322+
return;
323+
}
324+
325+
try {
326+
// Delete local tag
327+
log(`\n🗑️ Deleting local tag '${tagName}'...`, 'blue');
328+
execCommand(`git tag -d ${tagName}`);
329+
log(`✅ Local tag '${tagName}' deleted`, 'green');
330+
331+
// Delete remote tag
332+
log(`\n🗑️ Deleting remote tag '${tagName}'...`, 'blue');
333+
execCommand(`git push origin --delete ${tagName}`);
334+
log(`✅ Remote tag '${tagName}' deleted`, 'green');
335+
336+
log('\n✅ Tag deletion completed successfully!', 'green');
337+
338+
} catch (error) {
339+
log(`\n❌ Tag deletion failed: ${error.message}`, 'red');
340+
throw error;
341+
}
342+
}
343+
280344
async function main() {
281345
log('🚀 KHM Tools Release Script', 'bright');
282346
log('==========================\n', 'bright');
@@ -287,6 +351,14 @@ async function main() {
287351
throw new Error('package.json not found. Please run this script from the project root.');
288352
}
289353

354+
// Get main action
355+
const action = await getMainAction();
356+
357+
if (action === 'delete') {
358+
await deleteTag();
359+
return;
360+
}
361+
290362
// Check git status
291363
const branch = execCommand('git branch --show-current', true);
292364
if (branch !== 'main') {

0 commit comments

Comments
 (0)