The strategy for versioning and deployment/publishing within this project is complicated by the fact that there are two distinct
types of artifacts produced. That is, packages/desktop
produces platform-specific executables for linux, macOS, and Windows,
while packages/web
produces a static website intended to be dumped into an S3 website bucket (or otherwise sit
behind a web server).
- Make sure all your changes are committed and merged into
main
. - Navigate to the GH workflow actions and select "Run workflow" along with the branch
main
&staging
. - Review deploy action & approve if it looks good.
- Test out changes on staging.
- Navigate to the GH workflow actions and select "Run workflow" along with the branch
main
&production
. - Review deploy action & approve if it looks good.
- Test out changes on production
The following captures the steps of a release of this project to desktop:
- Make sure all your changes are committed and merged into main.
- Make sure branch is clean:
git checkout main git stash git pull
- Determine version bump type, choose one of
patch
,minor
, ormajor
, depending on the scale of the changes including in this version bump. This will create a version likev<version>
. See below for a guideline to which version to increment to.# You need to choose one of 'patch', 'minor', or 'major' export VERSION_BUMP_TYPE=<one of patch, minor, or major>
- Create tag and push new version to GitHub like so:
Verify that the
npm --no-commit-hooks version --workspace packages/desktop $VERSION_BUMP_TYPE -m "v%s"
"version"
property in allpackage.json
files matches the new version number; otherwise, update them to match. - Wait for a GitHub Action to automatically create new platform-specific
builds of
packages/desktop
, prepare a draft Github release, and upload the builds as release artifacts to that release. - Update the GitHub release once the Github action in Step 4 is finished, manually edit the Github release which was drafted as part of Step 4. Format its release name with the date (consistent with other release names), add a description of the changes, and optionally mark whether the release is "pre-release." If it is marked as "pre-release," it will not be accessible for download through the Github pages site.
-
Temporary workaround for MacOS (as of Jan 2025): GitHub Actions currently builds .dmg files that don't work for x86 processors and that are interpreted as "damaged" by new MacOS versions. To get around this, follow the instructions below to manually build executables. You will need to do this separately for both arm64 and x86, and each build process must be done on a machine that uses the correct processor (e.g., on a computer with an Intel chip for the x86 build).
After building, change the .dmg name to match the current tag number and the processor that the build is for (e.g.,
BioFile Finder-tag.number-arm64.dmg
orBioFile Finder-tag.number-x86_64.dmg
), and upload these to the release page. You may need to delete existing .dmg files from the release if GitHub has already generated them automatically.If the build doesn't work (e.g., says it's damaged when downloaded from GitHub), change the
mac
build arch in/desktop/package.json
from"universal"
to whichever processor you're targeting (e.g.,"arm64"
).
To manually build an executable for the desktop app, run the following from inside the packages/desktop
directory:
npm run build-executable
This will create a build
directory in packages/desktop
, where it will package the app based on your current branch. The directory will contain an install file (e.g., BioFile Finder-tag.number.dmg
if built on a Mac).
If needed, this install file can be manually added to a GitHub release. Note that this is currently necessary in order to release BFF for Macs that use Intel chips, since the GitHub workflow only generates working executables for ARM processors (Apple Silicon chips).