bots-garden/sidekickspublic Fork
⑂ v1.4.0
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/sidekicks.git
git clone ssh://git@rickub.com/bots-garden/sidekicks.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
🛟 Updated. 8095158 · on v1.4.0 · k33g · 16d ago
RELEASING.md · 65 lines · 4.8 KBmarkdown
Blame HistoryOpen raw

Releasing Sidekicks

Français

There is no CI workflow any more: everything runs on the Mac, with the local-ci-*.sh scripts at the root of the repository. They build, sign and notarize the macOS packages, create a draft release on Rickub, upload the files through a temporary branch (Rickub only accepts uploads from a CI job's token), and publish.

Step Command Result
1. Check ./local-ci-01-check.sh (make release-check) make verify: lint, tests, bindings
2. Build ./local-ci-02-build.sh (make release-package) release/<TAG>/: the macOS (Apple Silicon, signed and notarized) and Windows (x86-64 and Arm) packages, SHA256SUMS
3. Draft ./local-ci-03-create-draft.sh the tag and a draft prerelease on Rickub, with its notes
4. Upload ./local-ci-04-upload.sh the files are on the draft (temporary branch, deleted afterwards)
5. Publish ./local-ci-05-publish.sh the draft is public (asks you to type the tag), what is public is downloaded and compared
6. Promote ./local-ci-06-promote.sh optional: the prerelease becomes a release (asks you to type the tag)

Settings

Two files at the root, ignored by git (*.env):

  • .release.env: TAG, ABOUT, OWNER, REPO, and the macOS signature, SIGN_IDENTITY and NOTARY_PROFILE (by default $SIDEKICKS_SIGN_IDENTITY and $SIDEKICKS_NOTARY_PROFILE, part A of the signing guide). Empty SIGN_IDENTITY: the macOS packages are not signed.
  • .ci.cd.token.env: CI_TOKEN, the token that talks to Rickub. It never reaches a command line.

LOCAL_CI_ENV_FILE points the scripts at another settings file.

Test first with v9.9.9

TAG="v9.9.9" in .release.env is the test release: the tag may differ from the version of build/config.yml (the packages keep the real version in their names). Run steps 1 to 5, check the downloads, then delete the release and the tag on Rickub. Any other tag must be v + info.version.

Before: set the version

  1. In build/config.yml, set info.version (e.g. "0.2.0").
  2. scripts/sync-build-assets.sh: regenerates the Info.plist, Windows and Linux files from it and puts LSMinimumSystemVersion back to 13.0.0 (the generator resets it to 12.0.0). local-ci-02-build.sh runs it too and stops if it changed anything. Why: How to set the version.
  3. Write what is new in docs/release-notes/v<version>.md (and v<version>.fr.md): the draft's notes include the English one, under the install links.
  4. Set TAG="v<version>" in .release.env.
  5. Commit, merge into main, push: step 3 refuses a working tree with changes, and a HEAD that is not the remote's main.

2. Build

local-ci-02-build.sh runs scripts/build-release.sh (into dist/, unsigned), then, when SIGN_IDENTITY is set, signs and notarizes the app, builds the .dmg from the stapled app, signs, notarizes and staples it, and checks both with spctl. It stages everything in release/<TAG>/ with a new SHA256SUMS. It takes 10 to 20 minutes, mostly Apple's wait. The signing work happens in a temporary folder, so a synced folder (kDrive, iCloud…) cannot corrupt the signatures.

SKIP="windows" (or macos) leaves a system out; LINUX_ARCHES=amd64 adds the Linux packages (in Docker; they are not in release-names, so they are not staged). Details of the signing steps and the checks on another Mac: How to sign and notarize Sidekicks for macOS.

3 to 6. Publish

Steps 3 to 5 refuse to go on when something is off (no SHA256SUMS, release already public, HEAD not on the remote's main, .github/workflows still on HEAD). LOCAL_CI_PRINT_NOTES=1 ./local-ci-03-create-draft.sh prints the notes and creates nothing. Step 5 takes the latest place: /releases/latest points at the new version for everybody.

After: fetch the tag

git fetch --tags
git tag --list 'v*'      # v<version> is listed

The tag is created by Rickub: in every copy of the repository (this one included), fetch the tags.

When something goes wrong

Symptom What to do
makensis is missing brew install makensis — or SKIP=windows.
TAG is … but build/config.yml says … Fix .release.env, or raise info.version.
no valid identity / the notarytool profile does not work The commands in the message; part A of the signing guide.
notarization … Invalid xcrun notarytool log <id> --keychain-profile "$SIDEKICKS_NOTARY_PROFILE".
the release … already exists (409) Delete the release and its tag on Rickub, or raise the version.
The upload job fails or times out The script prints the job's log lines; the temporary branch local-ci-publish-<TAG> is deleted anyway (if not: delete it by hand).
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Releasing Sidekicks

[Français](RELEASING.fr.md)

There is no CI workflow any more: everything runs on the Mac, with the `local-ci-*.sh` scripts at the root of the repository. They build, sign and notarize the macOS packages, create a draft release on Rickub, upload the files through a temporary branch (Rickub only accepts uploads from a CI job's token), and publish.

| Step | Command | Result |
| --- | --- | --- |
| 1. Check | `./local-ci-01-check.sh` (`make release-check`) | `make verify`: lint, tests, bindings |
| 2. Build | `./local-ci-02-build.sh` (`make release-package`) | `release/<TAG>/`: the macOS (Apple Silicon, signed and notarized) and Windows (x86-64 and Arm) packages, `SHA256SUMS` |
| 3. Draft | `./local-ci-03-create-draft.sh` | the tag and a **draft prerelease** on Rickub, with its notes |
| 4. Upload | `./local-ci-04-upload.sh` | the files are on the draft (temporary branch, deleted afterwards) |
| 5. Publish | `./local-ci-05-publish.sh` | the draft is public (asks you to type the tag), what is public is downloaded and compared |
| 6. Promote | `./local-ci-06-promote.sh` | optional: the prerelease becomes a release (asks you to type the tag) |

## Settings

Two files at the root, ignored by git (`*.env`):

- `.release.env`: `TAG`, `ABOUT`, `OWNER`, `REPO`, and the macOS signature, `SIGN_IDENTITY` and `NOTARY_PROFILE` (by default `$SIDEKICKS_SIGN_IDENTITY` and `$SIDEKICKS_NOTARY_PROFILE`, [part A of the signing guide](docs/en/how-to/sign-and-notarize-on-macos.md)). Empty `SIGN_IDENTITY`: the macOS packages are not signed.
- `.ci.cd.token.env`: `CI_TOKEN`, the token that talks to Rickub. It never reaches a command line.

`LOCAL_CI_ENV_FILE` points the scripts at another settings file.

## Test first with v9.9.9

`TAG="v9.9.9"` in `.release.env` is the test release: the tag may differ from the version of `build/config.yml` (the packages keep the real version in their names). Run steps 1 to 5, check the downloads, then delete the release and the tag on Rickub. Any other tag must be `v` + `info.version`.

## Before: set the version

1. In `build/config.yml`, set `info.version` (e.g. `"0.2.0"`).
2. `scripts/sync-build-assets.sh`: regenerates the Info.plist, Windows and Linux files from it and puts `LSMinimumSystemVersion` back to `13.0.0` (the generator resets it to `12.0.0`). `local-ci-02-build.sh` runs it too and stops if it changed anything. Why: [How to set the version](docs/en/how-to/set-the-version.md).
3. Write what is new in `docs/release-notes/v<version>.md` (and `v<version>.fr.md`): the draft's notes include the English one, under the install links.
4. Set `TAG="v<version>"` in `.release.env`.
5. Commit, merge into `main`, push: step 3 refuses a working tree with changes, and a `HEAD` that is not the remote's `main`.

## 2. Build

`local-ci-02-build.sh` runs `scripts/build-release.sh` (into `dist/`, unsigned), then, when `SIGN_IDENTITY` is set, signs and notarizes the app, builds the `.dmg` from the stapled app, signs, notarizes and staples it, and checks both with `spctl`. It stages everything in `release/<TAG>/` with a new `SHA256SUMS`. It takes 10 to 20 minutes, mostly Apple's wait. The signing work happens in a temporary folder, so a synced folder (kDrive, iCloud…) cannot corrupt the signatures.

`SKIP="windows"` (or `macos`) leaves a system out; `LINUX_ARCHES=amd64` adds the Linux packages (in Docker; they are not in `release-names`, so they are not staged). Details of the signing steps and the checks on another Mac: [How to sign and notarize Sidekicks for macOS](docs/en/how-to/sign-and-notarize-on-macos.md).

## 3 to 6. Publish

Steps 3 to 5 refuse to go on when something is off (no `SHA256SUMS`, release already public, `HEAD` not on the remote's `main`, `.github/workflows` still on `HEAD`). `LOCAL_CI_PRINT_NOTES=1 ./local-ci-03-create-draft.sh` prints the notes and creates nothing. Step 5 takes the **latest** place: `/releases/latest` points at the new version for everybody.

## After: fetch the tag

```bash
git fetch --tags
git tag --list 'v*'      # v<version> is listed
```

The tag is created by Rickub: in every copy of the repository (this one included), fetch the tags.

## When something goes wrong

| Symptom | What to do |
| --- | --- |
| `makensis is missing` | `brew install makensis` — or `SKIP=windows`. |
| `TAG is … but build/config.yml says …` | Fix `.release.env`, or raise `info.version`. |
| `no valid identity` / the notarytool profile does not work | The commands in the message; part A of the signing guide. |
| `notarization … Invalid` | `xcrun notarytool log <id> --keychain-profile "$SIDEKICKS_NOTARY_PROFILE"`. |
| `the release … already exists` (409) | Delete the release and its tag on Rickub, or raise the version. |
| The upload job fails or times out | The script prints the job's log lines; the temporary branch `local-ci-publish-<TAG>` is deleted anyway (if not: delete it by hand). |