Improves a few things:
- Use the free macos-14 runners for arm64 builds. They are not as fast
the macos-13-xlarge runners used before, but they are free for public
repositories, meaning we can start doing nightly arm64 builds.
- Use different nix install and cache actions which are faster, and uses
a single action cache key, which avoids cache rate limit errors
which was slowing down cache create/restore times.
- Generally refactor and tidy up various bits and pieces in workflows.
Only run release jobs after all build jobs have completed, ensure only
one release job runs at a time, and also ensure update casks only runs
once after all release jobs have completed.
Builds using macOS 11 just takes a stupidly long time as, as Homebrew
seems to have dropped support, meaning all homebrew dependencies are
installed from source, rather than get installed from bottles.
Hence let's try upgrading minimum macOS version from 11 (Big Sur), to
12 (Monteray).
This should help reduce costs for Apple Silicon builds, as they are not
available on any form of free tier of GitHub Actions at the moment.
The build step that actually runs Emacs' configure script, and compiles
Emacs, is the only step that actually needs to run on the target
hardware architecture. The rest should be architecture agnostic.
This makes the workflow setup more flexible, and less copy/pasting
between workflows. And also makes the process of adding nightly builds
for non-master branches easier too.