2016-10-18 13:41:57 +09:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								# Releasing
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								This document describes the process for releasing a new version of Electron.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Compile release notes
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The current process is to maintain a local file, keeping track of notable changes as pull requests are merged. For examples of how to format the notes, see previous releases on [the releases page].
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 14:04:52 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Create a temporary branch
 
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 13:41:57 +09:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 14:04:52 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Create a new branch from `master`  named `release` .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								git checkout master
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								git pull
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								git checkout -b release
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								This branch is created as a precaution to prevent any merged PRs from sneaking into a release between the time the temporary release branch is created and the CI builds are complete.
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 13:41:57 +09:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Bump the version
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-19 11:40:40 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Run the `bump-version`  script, passing `major` , `minor` , or `patch`  as an argument:
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 13:41:57 +09:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```sh
							 
						 
					
						
							
								
									
										
										
										
											2016-10-19 11:40:40 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								npm run bump-version -- patch
							 
						 
					
						
							
								
									
										
										
										
											2016-10-20 11:34:51 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								git push origin HEAD
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 13:41:57 +09:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 14:04:52 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								This will bump the version number in several files. See [this bump commit] for an example.
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 13:41:57 +09:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 14:04:52 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Most releases will be `patch`  level. Upgrades to Chrome or other major changes should use `minor` . For more info, see [electron-versioning].
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 13:41:57 +09:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Edit the release draft
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								1.  Visit [the releases page] and you'll see a new draft release with placeholder release notes.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								1.  Edit the release and add release notes.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								1.  Click 'Save draft'. **Do not click 'Publish release'!** 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								1.  Wait for all the builds to pass. :hourglass_flowing_sand:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Merge temporary branch
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 14:04:52 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Merge the temporary back into master, without creating a merge commit:
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 13:41:57 +09:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								git merge release master --no-commit
							 
						 
					
						
							
								
									
										
										
										
											2016-10-20 11:19:18 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								git push origin master
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 13:41:57 +09:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 14:04:52 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								If this fails, rebase with master and rebuild:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								git pull
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								git checkout release
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								git rebase master
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								git push origin HEAD
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 13:41:57 +09:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								## Run local debug build
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Run local debug build to verify that you are actually building the version you want. Sometimes you thought you were doing a release for a new version, but you're actually not.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								npm run build
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								npm start
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Verify the window is displaying the current updated version.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-20 11:22:32 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Set environment variables
 
							 
						 
					
						
							
								
									
										
										
										
											2016-10-20 11:19:18 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-20 11:22:32 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								You'll need to set the following environment variables to publish a release. Ask another team member for these credentials.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-20 11:30:36 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								-  `ELECTRON_S3_BUCKET` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								-  `ELECTRON_S3_ACCESS_KEY` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								-  `ELECTRON_S3_SECRET_KEY` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								-  `ELECTRON_GITHUB_TOKEN`  - A personal access token with "repo" scope.
							 
						 
					
						
							
								
									
										
										
										
											2016-10-20 11:19:18 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								You will only need to do this once.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 13:41:57 +09:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								## Publish the release
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								This script will download the binaries and generate the node headers and the .lib linker used on Windows by node-gyp to build native modules.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								npm run release
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-20 11:29:02 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Note: Many distributions of Python still ship with old HTTPS certificates. You may see a `InsecureRequestWarning` , but it can be disregarded.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 14:04:52 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Delete the temporary branch
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								git checkout master
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								git branch -D release # delete local branch
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								git push origin :release # delete remote branch
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-18 13:41:57 +09:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								[the releases page]: https://github.com/electron/electron/releases
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[this bump commit]: https://github.com/electron/electron/commit/78ec1b8f89b3886b856377a1756a51617bc33f5a
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[electron-versioning]: /docs/tutorial/electron-versioning.md