From 2f62de136bdd950c90172a7b33c1d3e319fce41d Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Fri, 12 Apr 2024 15:26:56 -0500 Subject: [PATCH] update README with dev release steps (test auto-update) --- README.md | 77 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- src/main/index.ts | 1 + 3 files changed, 79 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b72234..5719526 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,80 @@ $ npm run dev # For windows $ npm run build:win:norelease ``` + +### Release + +1. Edit `package.json` to bump the semantic version number. For example: + +```json +{ + "version": "1.0.6" +} +``` + +2. Add a commit message that summarizes the release + +Since the release will associate the release with a commit that's already been pushed to the remote, make to include a commit message that you want to be associated with the release. For example: + +```bash +$ git commit -am "bump(1.0.6) add auto update" +$ git push +``` +3. Run the `build:win:release script` For example: + +```bash +# For windows +$ set SLTT_APP_PAT={https://github.com/settings/tokens/new?scopes=public_repo&description=sltt-app} +$ npm run build:win:release +yarn run v1.22.19 +warning package.json: No license field +$ npm run build && cross-env GH_TOKEN=%SLTT_APP_PAT% electron-builder --win --config --publish always + +> sltt-electron@1.0.6 build +> npm run typecheck && electron-vite build + + +> sltt-electron@1.0.6 typecheck +> npm run typecheck:node && npm run typecheck:web + + +> sltt-electron@1.0.6 typecheck:node +> tsc --noEmit -p tsconfig.node.json --composite false + + +> sltt-electron@1.0.6 typecheck:web +> tsc --noEmit -p tsconfig.web.json --composite false + +vite v4.3.3 building for production... +✓ 2 modules transformed. +out/main/index.js 1.59 kB +✓ built in 94ms +vite v4.3.3 building for production... +✓ 1 modules transformed. +out/preload/index.js 0.42 kB +✓ built in 10ms +vite v4.3.3 building for production... +✓ 33 modules transformed. +../../out/renderer/index.html 0.53 kB +../../out/renderer/assets/icons-6e56aee6.svg 9.10 kB +../../out/renderer/assets/index-3d722ea0.css 3.00 kB +../../out/renderer/assets/index-45827464.js 227.91 kB +✓ built in 449ms + • electron-builder version=23.6.0 os=10.0.22631 + • loaded configuration file=package.json ("build" field) + • writing effective config file=dist\builder-effective-config.yaml + • packaging platform=win32 arch=x64 electron=22.3.7 appOutDir=dist\win-unpacked + • cannot decode PKCS 12 data using Go pure implementation, openssl will be used error=pkcs12: unknown digest algorithm: 2.16.840.1.101.3.4.2.1 + • signing file=dist\win-unpacked\SLTT app.exe certificateFile={path-to-pfx} + • building target=nsis file=dist\SLTT app Setup 1.0.6.exe archs=x64 oneClick=true perMachine=false + • signing file=dist\win-unpacked\resources\elevate.exe certificateFile={path-to-pfx} + • Signing NSIS uninstaller file=dist\__uninstaller-nsis-sltt-electron.exe certificateFile={path-to-pfx} + • signing file=dist\SLTT app Setup 1.0.6.exe certificateFile={path-to-pfx} + • building block map blockMapFile=dist\SLTT app Setup 1.0.6.exe.blockmap + • publishing publisher=Github (owner: ubsicap, project: sltt-app, version: 1.0.6) + • uploading file=SLTT-app-Setup-1.0.6.exe.blockmap provider=github + • uploading file=SLTT-app-Setup-1.0.6.exe provider=github + • creating GitHub release reason=release doesn't exist tag=v1.0.6 version=1.0.6 + [====================] 100% 0.0s | SLTT-app-Setup-1.0.6.exe to github +Done in 38.75s. +``` diff --git a/package.json b/package.json index 67e591b..4b165d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sltt-electron", - "version": "1.0.6", + "version": "1.0.7", "description": "Installable SLTT app (Sign Language Translation Tool)", "main": "./out/main/index.js", "author": "sltt-bible.net", diff --git a/src/main/index.ts b/src/main/index.ts index b5dc4a7..dc6f018 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -47,6 +47,7 @@ app.whenReady().then(() => { electronApp.setAppUserModelId('com.electron') // Check for updates + // see https://www.electron.build/auto-update autoUpdater.checkForUpdatesAndNotify() // Default open or close DevTools by F12 in development