An open-source, cross-platform terminal for seamless workflows
Go to file
Evan Simkowitz 5b7535d08f
Add release channels (#385)
## New release flow

1. Run "Bump Version" workflow with the desired version bump and the
prerelease flag set to `true`. This will push a new version bump to the
target branch and create a new git tag.
    - See below for more info on how the version bumping works.
2. A new "Build Helper" workflow run will kick off automatically for the
new tag. Once it is complete, test the new build locally by downloading
with the [download
script](https://github.com/wavetermdev/thenextwave/blob/main/scripts/artifacts/download-staged-artifact.sh).
3. Release the new build using the [publish
script](https://github.com/wavetermdev/thenextwave/blob/main/scripts/artifacts/publish-from-staging.sh).
This will trigger electron-updater to distribute the package to beta
users.
4. Run "Bump Version" again with a release bump (either `major`,
`minor`, or `patch`) and the prerelease flag set to `false`.
6. Release the new build to all channels using the [publish
script](https://github.com/wavetermdev/thenextwave/blob/main/scripts/artifacts/publish-from-staging.sh).
This will trigger electron-updater to distribute the package to all
users.

## Change Summary

Creates a new "Bump Version" workflow to manage versioning and tag
creation.

Build Helper is now automated.

### Version bumps

Updates the `version.cjs` script so that an argument can be passed to
trigger a version bump. Under the hood, this utilizes NPM's `semver`
package.

If arguments are present, the version will be bumped.
If only a single argument is given, the following are valid inputs:
    - `none`: No-op.
    - `patch`: Bumps the patch version.
    - `minor`: Bumps the minor version.
    - `major`: Bumps the major version.
    - '1', 'true': Bumps the prerelease version.
If two arguments are given, the first argument must be either `none`,
`patch`, `minor`, or `major`. The second argument must be `1` or `true`
to bump the prerelease version.

### electron-builder

We are now using the release channels support in electron-builder. This
will automatically detect the channel being built based on the package
version to determine which channel update files need to be generated.
See
[here](https://www.electron.build/tutorials/release-using-channels.html)
for more information.

### Github Actions

#### Bump Version

This adds a new "Bump Version" workflow for managing versioning and
queuing new builds. When run, this workflow will bump the version,
create a new tag, and push the changes to the target branch. There is a
new dropdown when queuing the "Bump Version" workflow to select what
kind of version bump to perform. A bump must always be performed when
running a new build to ensure consistency.

I had to create a GitHub App to grant write permissions to our main
branch for the version bump commits. I've made a separate workflow file
to manage the version bump commits, which should help prevent tampering.
Thanks to using the GitHub API directly, I am able to make these commits
signed!

#### Build Helper

Build Helper is now triggered when new tags are created, rather than
being triggered automatically. This ensures we're always creating
artifacts from known checkpoints.

### Settings

Adds a new `autoupdate:channel` configuration to the settings file. If
unset, the default from the artifact will be used (should correspond to
the channel of the artifact when downloaded).

## Future Work

I want to add a release workflow that will automatically copy over the
corresponding version artifacts to the release bucket when a new GitHub
Release is created.

I also want to separate versions into separate subdirectories in the
release bucket so we can clean them up more-easily.

---------

Co-authored-by: wave-builder <builds@commandline.dev>
Co-authored-by: wave-builder[bot] <181805596+wave-builder[bot]@users.noreply.github.com>
2024-09-17 13:10:35 -07:00
.github Add release channels (#385) 2024-09-17 13:10:35 -07:00
.storybook Make magnify icon always visible, transition from magnify to minimize (#197) 2024-08-05 16:13:26 -07:00
.vscode enforce go fmt usage in vscode 2024-08-28 10:59:08 -07:00
build update app icons 2024-08-23 10:34:34 -07:00
cmd don't bookstrap the newwindow layout for the first run 2024-09-17 00:00:20 -07:00
db new directory structure and oldmigrate (#327) 2024-09-05 14:05:42 -07:00
emain Add release channels (#385) 2024-09-17 13:10:35 -07:00
frontend Add release channels (#385) 2024-09-17 13:10:35 -07:00
pkg Add release channels (#385) 2024-09-17 13:10:35 -07:00
public Move xterm.css to resolve Vite warning (#309) 2024-09-03 18:11:28 -07:00
scripts/artifacts Add release channels (#385) 2024-09-17 13:10:35 -07:00
.editorconfig Set up Windows build pipeline (#292) 2024-08-30 10:13:40 -07:00
.gitattributes Windows Bug Fixes (#281) 2024-08-27 15:12:26 -07:00
.gitignore Set up electron-builder for new app (#113) 2024-07-17 18:42:49 -07:00
.prettierignore Add filewatcher for config files (#63) 2024-06-19 23:59:41 -07:00
.yarnrc.yml Fix prettier formatting 2024-05-28 12:12:28 -07:00
electron-builder.config.cjs Add release channels (#385) 2024-09-17 13:10:35 -07:00
electron.vite.config.ts Fix sharp import issue (#251) 2024-08-20 13:18:47 -07:00
eslint.config.js Switch to using electron-vite instead of WebPack (#45) 2024-06-13 16:49:25 -07:00
go.mod Bump github.com/sashabaranov/go-openai from 1.29.1 to 1.29.2 (#375) 2024-09-13 11:42:58 -07:00
go.sum Bump github.com/sashabaranov/go-openai from 1.29.1 to 1.29.2 (#375) 2024-09-13 11:42:58 -07:00
index.html Simplify frontend/wave path in index.html (#48) 2024-06-13 17:00:07 -07:00
LICENSE Setup the Build Helper pipeline (#116) 2024-07-17 22:39:22 -07:00
package.json Add release channels (#385) 2024-09-17 13:10:35 -07:00
prettier.config.cjs Switch to using electron-vite instead of WebPack (#45) 2024-06-13 16:49:25 -07:00
README.md Switch to using electron-vite instead of WebPack (#45) 2024-06-13 16:49:25 -07:00
Taskfile.yml Add release channels (#385) 2024-09-17 13:10:35 -07:00
tsconfig.json fix dirname issue 2024-09-16 15:58:35 -07:00
version.cjs Add release channels (#385) 2024-09-17 13:10:35 -07:00
vitest.config.ts Switch to using electron-vite instead of WebPack (#45) 2024-06-13 16:49:25 -07:00
yarn.lock Add release channels (#385) 2024-09-17 13:10:35 -07:00

The Next Wave

Prereqs:

You'll need to install "task" (which we're using as a build/run system):

brew install go-task

On first checkout:

yarn
go mod tidy

Then, run the following command to start the app using the Vite dev server (this will enable Hot Module Reloading):

task electron:dev

To run the app without the dev server, run the following instead:

task electron:start