launchset 0.0.0-stage → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +100 -2
  3. package/dist/appstore-bVSJnUv2.js +143 -0
  4. package/dist/cli.js +6889 -0
  5. package/dist/errors-CHdD4g_K.js +58 -0
  6. package/dist/gitlab-child-girdQprO.js +6071 -0
  7. package/dist/http-dQt8kfON.js +127 -0
  8. package/dist/index.d.ts +854 -0
  9. package/dist/index.js +29 -0
  10. package/dist/init-Cv748KKZ.js +8222 -0
  11. package/dist/launchset.schema.json +1473 -0
  12. package/dist/play-D7nv0n-W.js +123 -0
  13. package/dist/prompts-S8h8cgml.js +52 -0
  14. package/dist/schema-CKljQNeI.js +1202 -0
  15. package/dist/store-BCwWrhhY.js +73 -0
  16. package/package.json +88 -4
  17. package/skills/launchset/AGENTS-snippet.md +24 -0
  18. package/skills/launchset/SKILL.md +205 -0
  19. package/skills/launchset-adopt/SKILL.md +222 -0
  20. package/templates/gitlab/child/build.yml +17 -0
  21. package/templates/gitlab/child/cli.yml +14 -0
  22. package/templates/gitlab/child/comment.yml +14 -0
  23. package/templates/gitlab/child/finalize.yml +14 -0
  24. package/templates/gitlab/child/header.yml +4 -0
  25. package/templates/gitlab/child/include.yml +6 -0
  26. package/templates/gitlab/child/nothing.yml +11 -0
  27. package/templates/gitlab/gitlab-ci.yml +23 -0
  28. package/templates/gitlab/launchset-preview.yml +62 -0
  29. package/templates/gitlab/launchset-targets.yml +44 -0
  30. package/templates/gitlab/launchset.yml +133 -0
  31. package/templates/gitlab/targets/android.yml +25 -0
  32. package/templates/gitlab/targets/custom-npm.yml +15 -0
  33. package/templates/gitlab/targets/custom.yml +23 -0
  34. package/templates/gitlab/targets/docker.yml +23 -0
  35. package/templates/gitlab/targets/ios.yml +33 -0
  36. package/templates/gitlab/targets/web.yml +13 -0
  37. package/templates/launchset-readme.md +23 -0
  38. package/templates/workflows/launchset-check.yml +33 -0
  39. package/templates/workflows/launchset-preview.yml +157 -0
  40. package/templates/workflows/launchset-release.yml +181 -0
  41. package/templates/workflows/snippets/android.yml +41 -0
  42. package/templates/workflows/snippets/custom-example.yml +12 -0
  43. package/templates/workflows/snippets/custom-npm.yml +19 -0
  44. package/templates/workflows/snippets/custom.yml +9 -0
  45. package/templates/workflows/snippets/docker-login.yml +9 -0
  46. package/templates/workflows/snippets/docker.yml +17 -0
  47. package/templates/workflows/snippets/ios.yml +46 -0
  48. package/templates/workflows/snippets/web.yml +20 -0
@@ -0,0 +1,73 @@
1
+ import { c as VerifyError } from "./http-dQt8kfON.js";
2
+ // src/verify/store.ts
3
+ /** The store decision of spec 7.3, shared by Google Play and App Store Connect. */
4
+ /**
5
+ * A build number as dotted integers (`"12"` → `[12]`, `"1.0.3"` → `[1, 0, 3]`), with
6
+ * trailing zero parts removed so `"12"` equals `"12.0"`. `undefined` if not numeric.
7
+ */
8
+ function parseBuildVersion(value) {
9
+ const text = String(value).trim();
10
+ if (!/^\d+(\.\d+)*$/.test(text)) return void 0;
11
+ const parts = text.split(".").map(Number);
12
+ while (parts.length > 1 && parts[parts.length - 1] === 0) parts.pop();
13
+ return parts;
14
+ }
15
+ /** Numeric comparison of two parsed build versions. */
16
+ function compareBuildVersions(a, b) {
17
+ const length = Math.max(a.length, b.length);
18
+ for (let i = 0; i < length; i++) {
19
+ const diff = (a[i] ?? 0) - (b[i] ?? 0);
20
+ if (diff !== 0) return diff;
21
+ }
22
+ return 0;
23
+ }
24
+ /** The build number of a store check; throws for `null` (the `eas` strategy). */
25
+ function requireBuildNumber(check, store) {
26
+ if (check.buildNumber === null) {
27
+ const target = check.target ? `Target "${check.target}"` : "This target";
28
+ throw new VerifyError(`${target} has no build number (buildNumber.strategy is "eas", which leaves build numbers to EAS), so it can't be checked against ${store}. Remove "store" from the target's verify list; EAS's autoIncrement keeps build numbers unique.`);
29
+ }
30
+ if (!Number.isSafeInteger(check.buildNumber) || check.buildNumber < 1) throw new VerifyError(`Build number ${check.buildNumber} isn't a positive integer, so it can't be checked against ${store}. Check the plan passed to verify.`);
31
+ return check.buildNumber;
32
+ }
33
+ /**
34
+ * Round `minimum` up to two significant digits, so the suggestion is easy to read
35
+ * (`83000001` → `84000000`, `57` → `57`, `1234` → `1300`).
36
+ */
37
+ function roundUpOffset(minimum) {
38
+ if (minimum < 100) return minimum;
39
+ const step = 10 ** (String(minimum).length - 2);
40
+ return Math.ceil(minimum / step) * step;
41
+ }
42
+ /** Apply spec 7.3 steps 2 to 4 to what the store reported. */
43
+ function decideStore(check, ours, state) {
44
+ const notes = state.notes?.length ? ` (${state.notes.join("; ")})` : "";
45
+ if (state.exact) return {
46
+ alreadyPublished: true,
47
+ message: `${state.store}: ${state.unit} ${ours} of version ${check.version} is already uploaded${notes}`
48
+ };
49
+ let highest;
50
+ for (const raw of state.numbers) {
51
+ const parsed = parseBuildVersion(raw);
52
+ if (parsed && (!highest || compareBuildVersions(parsed, highest.parsed) > 0)) highest = {
53
+ raw,
54
+ parsed
55
+ };
56
+ }
57
+ if (!highest) return {
58
+ alreadyPublished: false,
59
+ message: `${state.store}: no builds yet, ${state.unit} ${ours} is free${notes}`
60
+ };
61
+ if (compareBuildVersions(highest.parsed, [ours]) >= 0) {
62
+ const offset = check.offset ?? 0;
63
+ const minimum = offset + ((highest.parsed[0] ?? 0) - ours) + 1;
64
+ const suggested = roundUpOffset(minimum);
65
+ const extra = suggested === minimum ? "" : ` (at least ${minimum})`;
66
+ throw new VerifyError(`${state.store} already has ${state.unit} ${highest.raw}, which is >= this run's build number ${ours}. Uploading would fail. Raise buildNumber.offset in the launchset config from ${offset} to ${suggested}${extra} so new build numbers are higher than the store's${notes}.`);
67
+ }
68
+ return {
69
+ alreadyPublished: false,
70
+ message: `${state.store}: highest ${state.unit} is ${highest.raw}, below this run's ${ours}: not published yet${notes}`
71
+ };
72
+ }
73
+ export { requireBuildNumber as i, decideStore as n, parseBuildVersion as r, compareBuildVersions as t };
package/package.json CHANGED
@@ -1,6 +1,90 @@
1
1
  {
2
2
  "name": "launchset",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.2.0",
4
+ "description": "Changesets-style releases for lock-step monorepos: one version, many targets (Docker, Android, iOS, web).",
5
+ "keywords": [
6
+ "release",
7
+ "changesets",
8
+ "versioning",
9
+ "monorepo",
10
+ "build-numbers",
11
+ "docker",
12
+ "android",
13
+ "ios",
14
+ "react-native",
15
+ "capacitor",
16
+ "expo",
17
+ "github-actions",
18
+ "gitlab-ci"
19
+ ],
20
+ "type": "module",
21
+ "license": "MIT",
22
+ "author": "De Monsters",
23
+ "homepage": "https://demonsters.github.io/launchset/",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/demonsters/launchset.git"
27
+ },
28
+ "bugs": "https://github.com/demonsters/launchset/issues",
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "engines": {
33
+ "node": ">=24"
34
+ },
35
+ "bin": {
36
+ "launchset": "./dist/cli.js"
37
+ },
38
+ "exports": {
39
+ ".": {
40
+ "types": "./dist/index.d.ts",
41
+ "import": "./dist/index.js"
42
+ },
43
+ "./schema.json": "./dist/launchset.schema.json",
44
+ "./package.json": "./package.json"
45
+ },
46
+ "types": "./dist/index.d.ts",
47
+ "files": [
48
+ "dist",
49
+ "templates",
50
+ "skills/launchset",
51
+ "skills/launchset-adopt",
52
+ "README.md"
53
+ ],
54
+ "scripts": {
55
+ "build": "tsdown && node scripts/build-schema.ts && pnpm build:action",
56
+ "build:action": "node scripts/build-action.ts",
57
+ "prepack": "pnpm build",
58
+ "lint": "biome check .",
59
+ "format": "biome check --write .",
60
+ "typecheck": "tsc --noEmit -p tsconfig.json",
61
+ "test": "vitest run",
62
+ "test:watch": "vitest"
63
+ },
64
+ "packageManager": "pnpm@12.16.1",
65
+ "dependencies": {
66
+ "@actions/core": "^3.0.1",
67
+ "@clack/prompts": "^1.9.0",
68
+ "@octokit/rest": "^22.0.1",
69
+ "commander": "^15.1.0",
70
+ "jiti": "^2.7.0",
71
+ "jose": "^6.2.17",
72
+ "jsonc-parser": "^3.3.1",
73
+ "picomatch": "^4.0.7",
74
+ "semver": "^7.8.6",
75
+ "tinyglobby": "^0.2.17",
76
+ "yaml": "^2.9.1",
77
+ "zod": "^4.6.7"
78
+ },
79
+ "devDependencies": {
80
+ "@biomejs/biome": "^2.6.8",
81
+ "@types/node": "24.19.2",
82
+ "@types/picomatch": "^4.0.3",
83
+ "@types/semver": "^7.8.0",
84
+ "esbuild": "^0.28.2",
85
+ "msw": "^3.0.6",
86
+ "tsdown": "^0.23.7",
87
+ "typescript": "^7.0.2",
88
+ "vitest": "^5.1.0"
89
+ }
90
+ }
@@ -0,0 +1,24 @@
1
+ ## Releases (launchset)
2
+
3
+ This repo is released with [launchset](https://demonsters.github.io/launchset/): one version for every target, driven by changeset files in `.launchset/`. The release PR (`Release vX.Y.Z`) collects them. Merging it is the release.
4
+
5
+ - **Every PR needs a changeset, and each changelog bullet is about one change.** Create each with `npx launchset add --bump <major|minor|patch|none> --message "<summary>"`. Use `--empty` (`bump: none`) for docs, CI or test-only changes. If the CLI isn't available, write the file by hand in `.launchset/<three-words>.md`:
6
+
7
+ ```md
8
+ ---
9
+ bump: minor
10
+ ---
11
+
12
+ Add offline mode to the mobile app.
13
+ ```
14
+
15
+ - **Bump:** `major` breaks users or API clients, `minor` adds a feature, `patch` fixes a bug, `none` needs no release.
16
+ - **One changeset per change**, not per commit and not per PR. A change is one thing a user notices on its own (a feature, a fix). A PR that adds a feature and fixes two bugs gets three changesets, each with its own bump. Related changes with the same bump may share one changeset as a lead line plus a sub-bullet per change (start with the lead line, not `- `). Edit an existing pending changeset when your work extends it.
17
+ - **Summary:** user-facing; the first line becomes the changelog bullet. No PR number. Never put several changes in one sentence: if a line joins separate changes with "and", semicolons or a list, split it.
18
+ - **Repos that also use Changesets** (a `.changeset/` folder): npm packages with their own versions are released with Changesets. A PR that changes one needs a `.changeset/` file for the package **and** the `.launchset/` changeset. The launchset bump is about the launchset targets: `none` when no target uses the package, otherwise usually `patch`. Don't edit or merge the `Version Packages` PR (branch `changeset-release/*`) unless asked.
19
+ - **Pushing straight to the base branch:** make sure a changeset covers the work before you push. `npx launchset status` shows what is pending.
20
+ - **Never** edit version numbers, build numbers or `CHANGELOG.md` by hand. Never create tags starting with `v` or `launchset/` (or what `tags` sets in the launchset config). Never edit or push to the release PR (branch `launchset/release/*`), and don't merge it unless asked.
21
+ - On a `release/X.Y.x` branch (or what `maintenanceBranches` sets) only `patch` or `none` is allowed.
22
+ - Add the label `launchset:preview` (or whatever `preview.label` sets) to a PR to get a preview build.
23
+ - Manual targets (`release: "manual"`) are shipped on demand. Never ship one unasked. If `status` shows one is behind, tell the human.
24
+ - On GitLab (`.gitlab-ci.yml`, `.gitlab/launchset.yml`) read "MR" for "PR". Build steps live in `.gitlab/launchset-targets.yml` (one hidden `.launchset-<target>` job per target, no `rules`/`when`/`needs`/`stage`, one command per line, no early `exit`). A preview there needs a new pipeline after the label is added, or the manual `launchset-preview-plan` job. Never ask for or print `LAUNCHSET_TOKEN`.
@@ -0,0 +1,205 @@
1
+ ---
2
+ name: launchset
3
+ description: Load this whenever you change code in a repo that contains launchset.config.* or a .launchset/ folder, before you open a pull request or push to the base branch there, and when asked to bump a version, edit CHANGELOG.md, or create a tag or release. launchset releases the repo from changeset files, so every PR needs a changeset, and each changelog bullet must be about one change. This skill says how to write changesets, when to split them, which bump to pick, and what never to edit by hand (version numbers, build numbers, CHANGELOG.md, release tags, the release PR).
4
+ ---
5
+
6
+ # launchset: releases in this repo
7
+
8
+ This repo is released with launchset. One version drives every target (Docker images, Android, iOS, web). You describe each change in a small **changeset** file in `.launchset/`. launchset collects the changesets into a release PR (`Release vX.Y.Z`). Merging that PR is the release.
9
+
10
+ Commit messages don't matter. Release intent lives in changeset files only.
11
+
12
+ On GitLab the same applies with "MR" for "PR": the release MR is `Release vX.Y.Z` on the branch `launchset/release/<branch>`. See [On GitLab](#on-gitlab).
13
+
14
+ ## Every PR needs a changeset
15
+
16
+ Before you open a PR, make sure it adds at least one, and that no summary crams several changes into one bullet (see [One changeset per change](#one-changeset-per-change)). Create each with:
17
+
18
+ ```sh
19
+ npx launchset add --bump <major|minor|patch|none> --message "<summary>"
20
+ ```
21
+
22
+ For a change that needs no release (docs, CI, tests only) use `--empty`, which is `bump: none`:
23
+
24
+ ```sh
25
+ npx launchset add --empty
26
+ ```
27
+
28
+ The command prints the path of the new file, for example `.launchset/brave-lions-sing.md`. Commit it with your change. For a PR with three changes, run it three times.
29
+
30
+ If `npx` can't run it (it needs Node 24 or newer, and network access to npm), write the file by hand. Name it with three lowercase words and `.md`, in `.launchset/`:
31
+
32
+ ```md
33
+ ---
34
+ bump: minor
35
+ ---
36
+
37
+ Add offline mode to the mobile app.
38
+ ```
39
+
40
+ Only `bump` is needed. Any `.md` file in `.launchset/` other than `README.md` is a changeset. A `none` changeset has no body:
41
+
42
+ ```md
43
+ ---
44
+ bump: none
45
+ ---
46
+ ```
47
+
48
+ ## Pick the bump
49
+
50
+ | Bump | When |
51
+ | --- | --- |
52
+ | `major` | Breaking for users or API clients. |
53
+ | `minor` | A new feature. |
54
+ | `patch` | A bug fix. |
55
+ | `none` | No release needed: docs, CI, tests, internal refactors. |
56
+
57
+ When unsure between two, ask the human. The release gets the highest bump of all pending changesets.
58
+
59
+ ## Write a good summary
60
+
61
+ The summary becomes one changelog entry: its first line is the bullet, and any further lines are indented under it.
62
+
63
+ - One change per bullet. If a line joins separate changes with "and", semicolons or a list, split them (see below).
64
+ - User-facing: say what changed for the people who use the product, not how you did it.
65
+ - One short sentence. Use the same tense as the other entries in `CHANGELOG.md` (look at it first).
66
+ - No PR number and no author: launchset adds them.
67
+ - Fix: `Fix the crash when opening the login screen without a network connection.`
68
+ - Don't: `fix bug in LoginScreen.tsx (#123)`.
69
+
70
+ ## One changeset per change
71
+
72
+ A change is one thing a user would notice on its own: a feature, a fix, a behaviour change. Write one changeset per change: not per commit, and not per PR.
73
+
74
+ - Several commits for one change: one changeset.
75
+ - One PR with several changes: one changeset **for each**, with its own bump. A PR that adds a feature and fixes two bugs gets three changesets: one `minor`, two `patch`. Each lands under the right heading in the changelog.
76
+ - Several small changes that belong together and share a bump (parts of one feature, or tweaks to one screen) may share one changeset, written as a short lead line with a sub-bullet per change. Start with the lead line: the first line becomes the changelog bullet, so a body that starts with `- ` renders as `- - …`. Changes with different bumps always get their own changesets.
77
+ - Work that extends something with a pending changeset in `.launchset/`: edit that file instead of adding another. Look in `.launchset/` before you add.
78
+
79
+ Never put several changes in one sentence. Before you open the PR, read your summaries. If a line names more than one thing, split it.
80
+
81
+ Don't, one changeset for a whole PR:
82
+
83
+ ```md
84
+ ---
85
+ bump: minor
86
+ ---
87
+
88
+ Add offline mode to the mobile app; the search field keeps its text after going back, and the login screen no longer crashes without a network connection.
89
+ ```
90
+
91
+ Do, three changesets (they need different bumps):
92
+
93
+ ```md
94
+ ---
95
+ bump: minor
96
+ ---
97
+
98
+ Add offline mode to the mobile app.
99
+ ```
100
+
101
+ ```md
102
+ ---
103
+ bump: patch
104
+ ---
105
+
106
+ Keep the text in the search field after going back.
107
+ ```
108
+
109
+ ```md
110
+ ---
111
+ bump: patch
112
+ ---
113
+
114
+ Fix the crash when opening the login screen without a network connection.
115
+ ```
116
+
117
+ Also fine, related changes with one bump in one changeset:
118
+
119
+ ```md
120
+ ---
121
+ bump: minor
122
+ ---
123
+
124
+ Keyboard navigation in the photo grid:
125
+
126
+ - Space opens the selected photo in the viewer and closes it again.
127
+ - Enter opens the selected album.
128
+ - Up and Down move between folders.
129
+ ```
130
+
131
+ This becomes one bullet with three sub-bullets in the changelog.
132
+
133
+ ## Repos that also use Changesets
134
+
135
+ If the repo also has a `.changeset/` folder, its npm packages that have their own versions are released with Changesets, and everything else with launchset. A PR that changes such a package needs **both**:
136
+
137
+ - a `.changeset/` file that names the package and its bump (`npx changeset add`, or the repo's script for it), and
138
+ - the `.launchset/` changeset, as always.
139
+
140
+ The launchset bump is about the launchset targets, not the package. If a target uses the package (for example the app uses it from the workspace), the next release ships the change: pick the bump it means for that target's users, usually `patch`. If no target uses the package, use `bump: none`.
141
+
142
+ Never edit, push to or merge the Changesets release PR (`Version Packages`, branch `changeset-release/*`) unless the human asked you to. Merging it publishes the npm packages.
143
+
144
+ ## Pushing straight to the base branch
145
+
146
+ If the workflow here is to push to the base branch without a PR, make sure a changeset covers your work **before** you push. There is no PR check to remind you. `npx launchset status` shows what is pending, and a warning when commits exist that no changeset covers. If the repo has a pre-push hook, `launchset check --push` prints the same warning and never blocks.
147
+
148
+ ## Never do these
149
+
150
+ - **Never edit version numbers or build numbers by hand.** Not in `package.json`, `build.gradle`, `project.pbxproj`, `Info.plist`, `app.json`, Helm charts, or anywhere else a target's version lives. The release PR writes versions. CI writes build numbers. The PR check fails when a version file disagrees with the root version.
151
+ - **Never edit `CHANGELOG.md`.** The release PR adds sections.
152
+ - **Never create tags that start with `v` or `launchset/`** (or whatever the repo's launchset config sets in `tags`). They are launchset's release, marker and partial tags, and creating them can trigger or block releases.
153
+ - **Never edit or push to the release PR** (branch `launchset/release/*`). It is rebuilt and force-pushed on every run. Change the changesets on the base branch instead.
154
+ - **Never merge the release PR unless the human asked you to.** Merging it releases every target.
155
+ - Don't push to the branches of Dependabot or Renovate PRs.
156
+
157
+ ## Changing workflows: check the action versions
158
+
159
+ Your knowledge of GitHub Action versions is out of date. Do this when you add or change a `uses: owner/repo@vN` step in a workflow, or review a Dependabot or Renovate PR that bumps one.
160
+
161
+ - **Look up the latest release.** Don't go by memory: `gh api repos/<owner>/<repo>/releases/latest --jq .tag_name` (a 404 means tags only: `gh api repos/<owner>/<repo>/tags --jq '.[].name'`). The majors in the launchset workflows were current when `launchset init` wrote them, so they may be behind by now.
162
+ - **Check compatibility before you bump.** Read the release notes of every major in between (`gh api repos/<owner>/<repo>/releases/tags/<tag> --jq .body`). Check that each input and output the step uses still exists with the same meaning: read `action.yml` at the new tag and look for renamed, removed or deprecated inputs. Also check behaviour changes the workflow depends on, and the minimum runner version.
163
+ - **Adapt or hold back.** Adapt the step when an input was renamed. If the new major needs a secret or variable the repo may not have, or a runner upgrade, keep the old major and tell the human what it would take. Never make a step depend on a secret that doesn't exist yet.
164
+ - **Say what you checked** in the PR description: the old major, the new major and what changed.
165
+ - **Outdated pins you didn't come for.** If the workflow you're editing, or another one you read, pins actions that are behind, don't update them silently and don't ignore them. Tell the human which ones they are (`path:line`, old and new major, compatible or not), recommend updating the compatible ones, and ask whether to do it now, in a separate commit, or later.
166
+
167
+ ## Maintenance branches
168
+
169
+ On a `release/X.Y.x` branch (a hotfix line; the pattern is `maintenanceBranches` in the config), only `patch` or `none` changesets are allowed. A `minor` or `major` fails the PR check. A feature belongs on the base branch. A fix there also has to reach the base branch through its own PR with its own changeset.
170
+
171
+ ## Previews
172
+
173
+ To get a test build of a PR (TestFlight, Play internal track, preview Docker tags), add the label `launchset:preview` to the PR (or whatever `preview.label` says in `launchset.config.*`). Previews have no side effects. PRs from forks don't get one. On GitLab, adding a label starts no pipeline: push a commit or start a new pipeline, or play the manual job `launchset-preview-plan` in the MR pipeline. If the project has the preview sweep schedule, the pipeline starts by itself within a few minutes (up to an hour on GitLab.com Free).
174
+
175
+ ## Check the state
176
+
177
+ ```sh
178
+ npx launchset status # pending changesets, bump, next version, warnings
179
+ npx launchset status --json # the same as JSON
180
+ ```
181
+
182
+ ## Manual targets
183
+
184
+ A target with `release: "manual"` is stamped by every release but shipped on demand. **Never ship one unasked.** When `status` shows a manual target is behind (`ios: 1.3.0 (9 releases behind)`), tell the human. Say that it is shipped with the **Launchset release** workflow started by hand (`workflow_dispatch` with the `target` input, and optionally `version`), or by `launchset ship --target <name>` followed by `launchset mark`. Do not run those yourself without being asked.
185
+
186
+ ## On GitLab
187
+
188
+ If the repo has a `.gitlab-ci.yml` and no `.github/workflows/launchset-*.yml`, it runs launchset on GitLab. The rules above hold. What differs:
189
+
190
+ - **CI files.** launchset's jobs are in `.gitlab/launchset.yml` (included by `.gitlab-ci.yml`). The build and upload steps are in `.gitlab/launchset-targets.yml`: one hidden job `.launchset-<target>` per target. Edit build steps there, as plain GitLab CI YAML: no `rules`, `when`, `needs` or `stage`, one command per line (no `a && b`), no early `exit`. Don't edit `.gitlab/launchset.yml` or the generated `launchset-child.yml` unless asked.
191
+ - **Order and templates.** A target that needs another target's output gets `after: ["other"]` in `launchset.config.*`, not `needs` in its job. Templates a target job extends (`extends: .windows`) must be in a file listed in `gitlab.include` (such as `.gitlab/ci-templates.yml`), which may only hold hidden jobs, `variables` and `default`; templates in `.gitlab-ci.yml` aren't visible to the child pipeline.
192
+ - **PowerShell runners.** A target with `gitlab: { shell: "powershell" }` builds on a Windows runner: its steps in `.launchset-<target>` are PowerShell, and launchset's variables come from `. ./launchset.ps1` (`$env:LAUNCHSET_VERSION`).
193
+ - **Tags start no pipelines.** launchset pushes its tags with `git push -o ci.skip` (unless `gitlab.tagPipelines: true`). Don't add tag-triggered jobs to build releases: releases build in launchset's child pipeline.
194
+ - **Never hand-edit** the release MR, tags that start with `v` or `launchset/`, version numbers or `CHANGELOG.md`, as on GitHub.
195
+ - **Tokens.** The CI/CD variable `LAUNCHSET_TOKEN` (a project or group access token) is created by a human. Never ask for, read or print its value.
196
+ - **Manual targets.** Ship one with Run pipeline on the base branch and the variable `LAUNCHSET_TARGET` (optionally `LAUNCHSET_RELEASE_VERSION`), not with the GitHub workflow input. Never ship one unasked.
197
+ - **Preview sweep.** Optional: a pipeline schedule with the variable `LAUNCHSET_PREVIEW_SWEEP=true` runs `launchset-preview-sweep`, which starts an MR pipeline for MRs that just got the preview label. A human creates the schedule (Build > Pipeline schedules). `npx launchset preview-sweep --dry-run` shows what it would do. When you add a job without `rules` to `.gitlab-ci.yml` in such a project, start its rules with `- if: $LAUNCHSET_PREVIEW_SWEEP == "true"` / `when: never` (then `- if: $CI_PIPELINE_SOURCE != "merge_request_event"`), or it runs on every schedule run.
198
+ - **Debugging.** The plan job logs the child pipeline (collapsed section) and keeps `launchset-child.yml` as an artifact. `npx launchset plan --gitlab -` prints the child pipeline for the plan locally.
199
+
200
+ ## If something looks wrong
201
+
202
+ - The PR check says "this PR adds no changeset": the changeset must be added or changed **in this PR**, in `.launchset/`, with a valid `bump`.
203
+ - The PR check says "version mismatch": someone edited a version file by hand. Undo that edit.
204
+ - A changeset is rejected with `file:line`: read the message. Valid bumps are `major`, `minor`, `patch`, `none`, and a summary is required unless the bump is `none`.
205
+ - `.launchset/README.md` explains the folder to people. Read it for repo-specific notes.