Below are helpful notes for developers hacking on or releasing new versions of IPFS Desktop.
Before cutting a new release of IPFS Desktop, please go through the following process:
Manually test a few things that don't transfer well to automated testing:
- Mac & Windows (both must to be checked): Confirm that drag-and-drop file import works:
- Open Files screen
- Drag file(s) into it (PDF, images, or videos)
- Confirm file(s) import was successful by clicking on newly imported file to preview
- Mac & Windows (one check is sufficient): Confirm that import via Import button works:
- Open Files screen
- Click on Import button and select files(s) (directory, or standalone PDF, images, or videos)
- Confirm file(s) import was successful by clicking on newly imported file to preview
- Mac only: Drag/drop onto menubar icon behaves as expected when dragging one file, several files, and a combination of files/folders:
- File(s) import correctly
- Correct link is copied to clipboard
- Windows only: Right-click on a file and "Add to IPFS" from context menu works as expected:
- File(s) import correctly
- Correct link is copied to clipboard
- Mac & Windows (both must to be checked): Confirm that OS-wide protocol handler was registered by opening
ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdiin a stock web browser (Edge, Safari, Google Chrome) without IPFS Companion
Release PRs are created automatically by release-please whenever new changes are merged into the main branch. A release is created automatically by CI when that release PR is merged. See the changes made in ipfs#2664 for more information on that process.
So the first step is to merge the release PR. Once that is merged, the release will be created automatically by CI. Once the release is created, the following steps need to be done manually:
- Check out the releases page and find the latest release.
- Click the
Editbutton for the version we want to release - Ensure the release notes are correct and the binaries and other artifacts are attached. (there should be 15 attached assets total)
- The
latest.yml, latest-mac.yml, latest-linux.ymlfiles on the release are used by the app to determine when an app update is available. Source code (tar.gz)&Source code (zip)are attached by github automatically when the release is published.
- The
- Check the
Set as the latest releasebox. - Then click
Publish release.
All it takes for this is a simple command which will open a PR for you:
brew bump --open-pr homebrew/cask/ipfsBe sure you have an environment variable GITHUB_TOKEN set to a valid GitHub token with repo scope.
### Create release PR
npm run release-pr
### create github release
npm run release-gh
### When the above PR is merged and github release is created, bump the brew cask version:
brew bump --open-pr homebrew/cask/ipfs
# see https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#updating-a-cask if you run into issues.These steps are only needed as a fallback if CI is not correctly notarizing the .dmg file. For context, see #1365.
- Download the
.dmgfromhttps://github.com/ipfs-shipyard/ipfs-desktop/releases/vA.B.C. - Ensure
APPLEIDandAPPLEIDPASSare set either as environment variables or entries in.envfile. These need to belong to the same org as the certificate used for signing. - Run
node pkgs/macos/notarize-cli.js ./IPFS-Desktop-A.B.C.dmg. - Debug errors by calling the tool directly:
xcrun altool --notarize-app -f /path/to/IPFS-Desktop-0.X.0.dmg --primary-bundle-id io.ipfs.desktop -u XXX-from-vault-XXX -p XXX-app-specific-password-from-vault-XXX; also, see the long list of hoops Apple may ask you to jump through.
You may get an error when notarizing the .dmg for macOS, something like
Error: You do not have required contracts to perform an operation. With error code FORBIDDEN_ERROR.CONTRACT_NOT_VALID for id ca5a6ab7-758b-44a7-973e-b59147a573b8 You do not have required contracts to perform an operation (-19208)
Apple requires this every few months: new paperwork, but only Admin can click the Approve button on https://appstoreconnect.apple.com/agreements/#/
Contact the PL Apple Developer account Admin (account holder viewed at https://appstoreconnect.apple.com/access/users) in order to approve new contracts/agreements.