Commit Graph

43 Commits

Author SHA1 Message Date
Gergely Nagy
fbda727f31 CI: Merge the snapshot & release workflows
Having two workflows that do mostly the same thing, and the major difference
between them is whether they create a new release, or reuse an existing one,
when they should be sharing the vast majority of code, is rather pointless, and
leads to bugs.

Bugs like forgetting to add the settings required for Windows code signing to
the release workflow.

With the workflows merged, we have a single build workflow to maintain, share
the vast majority of code between snapshot and production builds, and thus, we
can avoid such mishaps in the future.

It also makes the release process slightly more reliable, because the snapshot
and release builds will not trip over each other, as there will be only one.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-07-29 12:42:17 +02:00
Gergely Nagy
cf88c48c39 CI: Bump actions/checkout to v3
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-07-07 12:36:48 +02:00
Gergely Nagy
a806306050 CI: Snapshot workflow improvements
Do not run the snapshot workflow for tagged releases, and when deleting the
snapshot tag during recreation, push the deletion up to the origin too.

Pushing the deletion up to the origin lets us fully recreate the tag, so it will
not point to some random old commit, but to the latest one.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-07-07 11:59:08 +02:00
Gergely Nagy
3fee79d3dd Enable auto-update for snapshot builds too
For this to work, we need to change our workflow a little: instead of a static
`snapshot` tag, we have to use a SemVer-compatible tag, such as
`0.10.3-snapshot` - effectively the same version that is in `package.json` (sans
the build number).

To make this automatic, there's a new tool, `tools/snapshot-tag`, which strips
the build number from the version in `package.json`, if there's any. We use this
tool to figure out which tag to re-release during the snapshot workflow.

We also have to update README.md to point to the appropriate snapshot, so the
`tools/release/create-snapshot.sh` tool has been updated to take care of that,
too.

With the workflow changes, we can adjust the autoUpdater configuration to allow
pre-releases, and use the "snapshot" channel. Because we only enable this when
running a snapshot release, auto-upgrade *to* a snapshot release will only work
from a snapshot release. Upgrading from an earlier snapshot to a release is not
done either, because we're tied to a given channel.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-24 12:10:58 +02:00
Gergely Nagy
629469b269 CI: Enable code signing on Windows too
Now that we have a certificate, enable code signing on Windows too.

Fixes #927.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-22 21:15:28 +02:00
Gergely Nagy
3bc871d41b CI: Attach latest*.yml to snapshot & prod releases
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-09 16:07:37 +02:00
Gergely Nagy
faa74ad66b CI: Attach the latest-*.yml files to the snapshot release
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-09 14:28:11 +02:00
Gergely Nagy
e909794728 CI: Check if yarn.lock is up to date as part of the lint workflow
It happend a few times before that we updated `package.json`, but forgot to
update `yarn.lock`. This extra steps make sure we don't miss that.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-03 01:23:08 +02:00
Gergely Nagy
1c74d1f1df CI: Allow the local snapshot tag deletion to fail
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-05-07 02:57:31 +02:00
Gergely Nagy
a0934ec40a CI: When deleting the snapshot release, do so locally too
As part of our snapshot workflow, we delete and re-create the snapshot
release (and tag), to have a consistent tag to link to, and upload artifacts to.
However, when doing so, we only deleted the release and the tag remotely, not on
the local checkout.

This led to every second build failing, until the publish step was re-run.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-05-07 02:29:13 +02:00
Gergely Nagy
c8187965f4 github: Bump node to 16 for CI
Bump the node version we use for CI to 16, to match Electron's.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-03-24 18:43:21 +01:00
Gergely Nagy
ab4555a29c github: Use node 14 for CI
Some of our updated dependencies require node >= 14 now, so up the version we
use in CI accordingly.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-03-24 13:17:50 +01:00
Gergely Nagy
ada95569d0 CI: Decrease node to 12, down from 16
As it turns out, we fail to build in a CI environment with node 16 on at least
Windows. Lets fall back to node 12, which allows us to continue building
everywhere.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-12-09 12:16:48 +01:00
Gergely Nagy
52cdd36328 CI: Bump the node versions used for CI from 10/12 to 16
For historical reasons, we've been using node 10 for both release and snapshot
builds, and 12 for linting. As that's rather old, and some of our transitive
dependencies no longer support anything older than 12, lets move forward, and
bump node to 16. That's the current LTS release, and our whole stack should work
well with it, Electron and serialport included.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-12-09 09:42:31 +01:00
Jesse Vincent
2d1e7f6969 macos api keys are env variables 2021-09-29 17:13:21 -07:00
Jesse Vincent
33091befb0 Add a modern macos sign and notarize flow for github 2021-09-29 16:37:38 -07:00
Gergely Nagy
ffbf77459d github/workflows: Run the snapshot workflow for the master branch only
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-04-04 14:45:39 +02:00
Gergely Nagy
67646f96c7 github/workflows: Adjust the release workflow a little
We should be doing a proper release, not a pre-release, and also name our
publish step appropriately.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-03-29 20:12:21 +02:00
Gergely Nagy
b084f23a84 github/workflows: Fix the version extraction for the release workflow
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-03-29 19:31:29 +02:00
Gergely Nagy
96ffa1bfed github/workflows: Update the release workflow to be more reliable
Instead of relying on electron-builder to do the right thing, do the release
process ourselves, step by step.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-03-29 19:14:50 +02:00
Gergely Nagy
e8dccfc2ab Update our release and snapshot workflows
This is a major restructuring of our GitHub Actions workflows. First of all, we
now have separate workflows for release and snapshot builds, as having them
separate makes it easier to control which one runs when. It also allows us to
fine tune a lot of things for the snapshot workflow, which runs much more often.

Another change is that we're now using a static tag (`snapshot`) for development
builds, rather than a versioned tag, and this tag - and the pre-release on
GitHub - will get remade on every run, to keep it up to date.

We also have the build number back for our snapshot builds again, something we
lost with the transition away from Travis.

Documentation and scripts have been appropriately updated.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-03-23 21:28:15 +01:00
Gergely Nagy
f0123c8316 Update usb to 1.6.5
Update our `usb` dependency to 1.6.5, which compiles with -std=c++14 set. Also
remove the `CXXFLAGS` environment variable from the GitHub workflows, as they
are no longer needed.

Fixes #661.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-02-15 12:33:38 +01:00
Gergely Nagy
e3b0efa41d github/workflows: Ignore the release time when publishing snapshots
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-26 15:40:01 +01:00
Gergely Nagy
ea030f1ae4 github/workflows: Adjust the snapshot/prod publish conditions
We moved away from tagging production releases with a `chrysalis-` prefix, we're
using `-snapshot` postfixes for snapshot builds instead.

In the end, we'll publish a snapshot for every push to master (even if it's a
release push), and we'll publish a release if we're tagged appropriately.

This addresses the second part of #644.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-26 14:49:49 +01:00
Gergely Nagy
647c77fc30 github/workflows: Adjust the production publish env vars
For the production publish step, we do not need `EP_PRE_RELEASE` set to true, as
we're going to use a draft. We do need `CXXFLAGS` set like in all other steps.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-26 14:04:55 +01:00
Gergely Nagy
cc5969b9a1 github/workflows: Run an apt update before installing packages
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-19 23:30:30 +01:00
Gergely Nagy
bab7b0077b github/workflows: Add missing env vars for the publish steps, too
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-18 20:48:14 +01:00
Gergely Nagy
3827b56e72 github/workflows: Update the build & publish workflow
This separates the build and publish steps, so we can have slightly different
publish steps depending on whether we're building a snapshot or a tagged
release. On a tagged release, we'll update the existing draft. On a snapshot,
we'll overwrite an existing pre-release.

Also update the document describing our release process.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-18 13:43:13 +01:00
Gergely Nagy
c8c61943cc github/workflows: Set up the environment properly for the lint workflow too
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-18 11:43:41 +01:00
Gergely Nagy
938bf19fac github/workflows: Clean up and comment the build workflow a bit
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-18 11:29:08 +01:00
Gergely Nagy
b16965cab8 github/workflows: Adjust the release tag pattern
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-18 11:29:08 +01:00
Gergely Nagy
a6da9498fc github/workflows: Set up network-timeout for yarn
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-18 11:29:08 +01:00
Gergely Nagy
a9a60c434a github/workflows: Set the build script name explicitly
By default, the action we use defaults to `build` as the build script name,
while we use `compile` for the same purpose. I believe `compile` is the better
name, so tell the action to use that.

We need this step so that our sources are compiled before they're packed up.
Without compilation, many of the things we want to end up in the package simply
won't be there, and the build would fail.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-18 11:29:07 +01:00
Gergely Nagy
8bfab5ce34 github/workflows: Use the proper env vars for building
To build successfully, we need to pass `-std=c++14` to the c++ compiler while
compiling native dependencies. The easiest to achieve that is setting the
`CXXFLAGS` environment variable appropriately.

Similarly, we set `YARN_GPG` to no, to avoid timeouts on certain platforms.

Both of these were set for Travis, so we just copy them here, too.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-18 11:27:16 +01:00
Jesse Vincent
18fcf83474 prettier doesn't belong in a linter check without a wrapper to make sure that the results are unchanged 2021-01-18 10:27:21 +01:00
Jesse Vincent
dbe3668fad Fix our linters 2021-01-18 10:27:21 +01:00
Jesse Vincent
65e3c679b1 sudo 2021-01-18 10:27:21 +01:00
Jesse Vincent
4818f90aff linting needs udev-dev too 2021-01-18 10:27:20 +01:00
Jesse Vincent
84b36d07e5 added lint.yml 2021-01-18 10:27:20 +01:00
Jesse Vincent
8dd1854e4b try to install udev-dev if building on linux 2021-01-18 10:27:20 +01:00
Jesse Vincent
15958f998e first pass build.yml 2021-01-18 10:27:20 +01:00
Gergely Nagy
d1a5859f4d github: Update the bug report template
Now that we have a "System Information" screen that can create debug bundles,
suggest that screen in the template, instead of recommending saving the dev
console contents.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2020-10-09 19:20:44 +02:00
Gergely Nagy
d0d41f3a7e Add issue templates
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2019-02-07 08:43:48 +01:00