1- # Release Process
1+ # Automatic Release Process
22
3- This project is configured with automated GitHub Actions to build and release Windows executables.
3+ This project now features ** fully automated releases ** that trigger when the version in ` package.json ` changes!
44
55## How it works
66
7- 1 . ** On every push** to ` main ` /` master ` : The workflow builds the app to test that everything compiles correctly
8- 2 . ** On tag push** (version tags like ` v1.0.0 ` ): The workflow builds the app and creates a GitHub release with Windows executables
7+ 1 . ** On every push** : GitHub Actions checks if the version in ` package.json ` has changed
8+ 2 . ** If version changed** : Automatically builds the app, creates a git tag, and publishes a GitHub release
9+ 3 . ** If version unchanged** : Just builds the app to test that everything compiles correctly
910
10- ## Creating a Release
11+ ## Creating a Release (Super Easy!)
1112
1213### Method 1: Using the release scripts (Recommended)
1314
@@ -24,85 +25,87 @@ npm run release:major
2425
2526These scripts will:
2627- Bump the version in ` package.json `
27- - Create a git tag
28- - Push changes and tags to GitHub
29- - Trigger the GitHub Actions workflow automatically
28+ - Push the changes to GitHub
29+ - ** GitHub Actions automatically detects the version change and creates the release!**
3030
31- ### Method 2: Manual process
31+ ### Method 2: Manual version bump
3232
3333``` bash
3434# Bump version manually
3535npm version patch # or minor, major
3636
37- # Push changes and tags
37+ # Push changes
3838git push
39- git push --tags
40- ```
4139
42- ## What gets built
43-
44- The GitHub Actions workflow will create:
45- - ** NSIS Installer** (` .exe ` ) - Standard Windows installer
46- - ** Portable Executable** (` .exe ` ) - Standalone executable that doesn't require installation
47- - ** MSI Package** (if configured) - Windows Installer package
48-
49- ## Build Configuration
50-
51- The build configuration is in ` package.json ` under the ` build ` section:
52-
53- ``` json
54- {
55- "build" : {
56- "appId" : " cdc.starterkit.electron" ,
57- "productName" : " CDC Electron Starterkit" ,
58- "win" : {
59- "target" : [
60- {
61- "target" : " nsis" ,
62- "arch" : [" x64" ]
63- },
64- {
65- "target" : " portable" ,
66- "arch" : [" x64" ]
67- }
68- ]
69- }
70- }
71- }
40+ # GitHub Actions will automatically handle the rest!
7241```
7342
74- ## GitHub Actions Workflow
43+ ### Method 3: Edit package.json directly
44+
45+ You can even manually edit the version in ` package.json ` , commit, and push - the workflow will detect the change and create a release automatically!
46+
47+ ## What Gets Built Automatically
48+
49+ When a version change is detected, GitHub Actions will:
50+ - ** Build** the Windows executable
51+ - ** Create a git tag** (e.g., ` v1.0.1 ` )
52+ - ** Create a GitHub release** with:
53+ - NSIS Installer (` .exe ` ) - Standard Windows installer
54+ - Portable Executable (` .exe ` ) - Standalone executable
55+ - Auto-generated release notes
7556
76- The workflow file is located at ` .github/workflows/build-and-release.yml ` and includes:
57+ ## Workflow Jobs
7758
78- - ** Build job** : Runs on Windows, builds the app, uploads artifacts
79- - ** Release job** : Creates GitHub release with built executables (only on tag push)
80- - ** Build-on-push job** : Tests builds on every push without releasing
59+ The new workflow includes these jobs:
8160
82- ## Requirements
61+ 1 . ** check-version** : Detects if version in ` package.json ` changed
62+ 2 . ** build** : Builds the app and uploads artifacts (always runs)
63+ 3 . ** create-tag-and-release** : Creates tag and GitHub release (only if version changed)
64+ 4 . ** build-only** : Test build without release (only if version unchanged)
8365
84- - Repository must have GitHub Actions enabled
85- - The ` GITHUB_TOKEN ` is automatically provided by GitHub Actions
86- - Repository must match the one configured in ` package.json ` (` codesign-cloud/cdc-electron-starterkit ` )
66+ ## Example Workflow
67+
68+ ``` bash
69+ # Current version is 1.0.0
70+ npm run release:patch
71+
72+ # This will:
73+ # 1. Change package.json version to 1.0.1
74+ # 2. Commit the change
75+ # 3. Push to GitHub
76+ # 4. GitHub Actions detects version change
77+ # 5. Builds Windows executable
78+ # 6. Creates tag v1.0.1
79+ # 7. Creates GitHub release with executables
80+ ```
81+
82+ ## Monitoring Releases
83+
84+ - Check the ** Actions** tab to see the build progress
85+ - Check the ** Releases** section to see published releases
86+ - Each release will include download links for Windows executables
87+
88+ ## Benefits of This Approach
89+
90+ ✅ ** Fully Automated** : Just bump version and push
91+ ✅ ** No Manual Tagging** : Tags are created automatically
92+ ✅ ** Version Control** : Only creates releases when version actually changes
93+ ✅ ** Consistent** : Same process every time
94+ ✅ ** Safe** : Still builds and tests on every push
8795
8896## Troubleshooting
8997
90- If builds fail :
91- 1 . Check the GitHub Actions logs in the "Actions" tab of your repository
92- 2 . Ensure all dependencies are properly listed in ` package.json `
93- 3 . Test the build locally with ` npm run build `
94- 4 . Make sure the repository name in ` package.json ` matches your actual repository
98+ If releases aren't being created :
99+ 1 . Ensure the version in ` package.json ` actually changed
100+ 2 . Check the Actions tab for any workflow errors
101+ 3 . Verify you have push permissions to the repository
102+ 4 . Make sure the workflow file is in the correct location
95103
96104## Local Testing
97105
98- To test the build process locally :
106+ To test builds locally without releasing :
99107
100108``` bash
101- # Install dependencies
102109npm ci
103-
104- # Build renderer
105110npm run build:renderer
106-
107- # Build for Windows (requires Windows or cross-compilation setup)
108111npm run build
0 commit comments