|
| 1 | +# Releasing Coder Desktop |
| 2 | + |
| 3 | +These tasks require access to Coder's Apple Developer team and admin access to |
| 4 | +this repository. |
| 5 | + |
| 6 | +## Releasing a new version |
| 7 | + |
| 8 | +Versions come from Git tags of the form `vX.Y.Z` (see `scripts/version.sh`). |
| 9 | +Pushing a tag doesn't start a workflow, but the GitHub release needs a tag to |
| 10 | +point at. |
| 11 | + |
| 12 | +1. Tag the commit on `main` that you want to release, and push the tag: |
| 13 | + |
| 14 | + ```bash |
| 15 | + git tag vX.Y.Z |
| 16 | + git push origin vX.Y.Z |
| 17 | + ``` |
| 18 | + |
| 19 | +2. Wait for the `release` workflow run for that commit on `main` to finish. |
| 20 | + It publishes the `preview` build and updates the appcast, so publishing the |
| 21 | + release while it is still running can race on the appcast update. |
| 22 | +3. [Create a GitHub release](https://github.com/coder/coder-desktop-macos/releases/new) |
| 23 | + from the tag and write the release notes. The release notes are used as the |
| 24 | + update description in the Sparkle appcast, so write them before publishing. |
| 25 | +4. Publishing the release starts the `release` workflow, which builds, signs, |
| 26 | + and notarizes the app, uploads the assets to the release, updates the |
| 27 | + appcast, and opens a pull request to update the |
| 28 | + [homebrew-coder](https://github.com/coder/homebrew-coder) cask. Wait for it |
| 29 | + to finish, then review and merge the cask pull request. |
| 30 | + |
| 31 | +## Updating provisioning profiles |
| 32 | + |
| 33 | +Release builds are signed with two provisioning profiles, one for the app |
| 34 | +(`com.coder.Coder-Desktop`) and one for the network extension |
| 35 | +(`com.coder.Coder-Desktop.VPN`). CI reads them from these repository secrets: |
| 36 | + |
| 37 | +| Secret | Profile file | |
| 38 | +| ---------------------------------------------- | ------------------------------------------ | |
| 39 | +| `CODER_DESKTOP_APP_PROVISIONPROFILE_B64` | `Coder_Desktop_App.provisionprofile` | |
| 40 | +| `CODER_DESKTOP_EXTENSION_PROVISIONPROFILE_B64` | `Coder_Desktop_Extension.provisionprofile` | |
| 41 | + |
| 42 | +When a profile expires or needs regenerating: |
| 43 | + |
| 44 | +1. Sign in to the [Apple Developer portal](https://developer.apple.com/account/resources/profiles/list) |
| 45 | + and open **Certificates, Identifiers & Profiles** > **Profiles**. |
| 46 | +2. Regenerate or edit the profile if needed, then download it. |
| 47 | +3. Base64-encode the downloaded file and copy the output: |
| 48 | + |
| 49 | + ```bash |
| 50 | + cat Coder_Desktop_App.provisionprofile | base64 |
| 51 | + cat Coder_Desktop_Extension.provisionprofile | base64 |
| 52 | + ``` |
| 53 | + |
| 54 | +4. Paste the output into the matching secret under **Settings** > |
| 55 | + **Secrets and variables** > **Actions**. |
| 56 | + |
| 57 | +To check new profiles before cutting a release, run the `release` workflow |
| 58 | +manually with **dryrun** enabled. The build is uploaded as a workflow artifact |
| 59 | +instead of a release asset. |
0 commit comments