diff --git a/DEVELOPER.md b/DEVELOPER.md index ec06ccd5..02ecf008 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -39,47 +39,17 @@ Besides the BitGo SDK, the WRW also depends on third-party nodes or block explor You can test out a release by running `npm run build`. This will give you a packaged target in `/release`. -## Build and Release - -Update the package.json version to the next release version, and commit the changes. Then run `./scripts/docker-build.sh`. - -#### Build troubleshooting +### Build troubleshooting - Note that in order to run the build script, you'll either need python available at `/usr/bin/python`, or you can set an environment variable `PYTHON_PATH`. You can set the variable by running `export PYTHON_PATH=$(which python)`. - If you encounter the error `libtool is required, but wasn't found on this system`, you'll need to install `sodium` using [these instructions](https://github.com/paixaop/node-sodium). -Package files will be created in `/release`: - -```bash -Wallet Recovery Wizard-Linux-VERSION.deb -Wallet Recovery Wizard-VERSION.dmg -Wallet Recovery Wizard-Setup-VERSION.exe -``` - -In order to add the checksums to the release notes, run: - -```bash -./scripts/release-notes.sh -``` +## Release -Add the output to the bottom of the release notes section - -### Steps to Release - -- Run `git clean -dfx` -- Update version on `package.json` following semantic versioning - https://docs.npmjs.com/about-semantic-versioning -- `npm install` again to generate `package-lock.json` -- Create a branch, commit and merge changes to `master` -- Check out to `master` branch locally and `git pull` -- Go to `https://github.com/BitGo/wallet-recovery-wizard/releases` -- Click `Create draft release` -- Add new tag to the release with the version of the release e.g. `v4.2.1` -- Add title with the version e.g. `v4.2.1` -- Click `Generate release notes` -- (On MacOS) Locally run the docker build script: `./scripts/docker-build.sh` -- (On MacOS) Run the release notes generation script: `./scripts/release-notes.sh` - - Copy the output and paste it into the release notes draft in GitHub -- After having already ran the docker build script - - Go into the `release` folder in the root of the repository and upload the `.dmg` , `.deb` and `.exe` files into the release draft in GitHub -- Publish release in GitHub -- Go to Slack on #eng-wrw and announce the release with the link to GitHub release page +- Navigate to the [GHA release workflow page](https://github.com/BitGo/wallet-recovery-wizard/actions/workflows/release.yml), and click on `Run workflow` +- Enter the version number for the next release. This should be a [semantic version](https://docs.npmjs.com/about-semantic-versioning). +- Click on `Run workflow`. +- The workflow will create a draft release in the [releases page](https://github.com/BitGo/wallet-recovery-wizard/releases). +- Validate that the release notes are accurate, and that the artifacts are working correctly. +- Publish the release in GitHub. This will also create a git tag in the repository. +- Go to Slack on `#eng-wrw` and announce the release with the link to GitHub release page. diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh deleted file mode 100755 index 5bbee2c7..00000000 --- a/scripts/docker-build.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -docker run --rm -ti \ - --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \ - --env ELECTRON_CACHE="/root/.cache/electron" \ - --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \ - -v "${PWD}":/project \ - -v "${PWD##*/}"-node-modules:/project/node_modules \ - -v ~/.cache/electron:/root/.cache/electron \ - -v ~/.cache/electron-builder:/root/.cache/electron-builder \ - electronuserland/builder:16-wine \ - /bin/bash -c "npm install && npm run build -- -wl" - -npm i dmg-license && npm run build -npm uninstall dmg-license diff --git a/scripts/release-notes.sh b/scripts/release-notes.sh deleted file mode 100755 index 14d76728..00000000 --- a/scripts/release-notes.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -PKG_VERSION=$(npm pkg get version | sed 's/"//g') -DEB_PATH="release/$PKG_VERSION/Wallet Recovery Wizard-Linux-$PKG_VERSION.deb" -EXE_PATH="release/$PKG_VERSION/Wallet Recovery Wizard-Setup-$PKG_VERSION.exe" -DMG_PATH="release/$PKG_VERSION/Wallet Recovery Wizard-$PKG_VERSION.dmg" - -if [ ! -f "$DEB_PATH" ]; then - echo "Error: $DEB_PATH does not exist" - echo "Please run ./scripts/docker-build.sh on a MacOS machine to build the DEB" - exit 1 -fi - -if [ ! -f "$EXE_PATH" ]; then - echo "Error: $EXE_PATH does not exist" - echo "Please run ./scripts/docker-build.sh on a MacOS machine to build the EXE" - exit 1 -fi - -if [ ! -f "$DMG_PATH" ]; then - echo "Error: $DMG_PATH does not exist" - echo "Please run ./scripts/docker-build.sh on a MacOS machine to build the DMG" - exit 1 -fi - -DEB_SHA=$(shasum -a 256 "$DEB_PATH" | cut -d ' ' -f 1) -EXE_SHA=$(shasum -a 256 "$EXE_PATH" | cut -d ' ' -f 1) -DMG_SHA=$(shasum -a 256 "$DMG_PATH" | cut -d ' ' -f 1) - -echo "#### SHA-256 Hashes:" -echo "Linux(.deb): $DEB_SHA" -echo "MacOS(.dmg): $DMG_SHA" -echo "Windows(.exe): $EXE_SHA"