@trajectonomics/tooling 0.1.0-alpha.0 → 0.1.0-alpha.2

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 (2) hide show
  1. package/README.md +46 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -55,8 +55,32 @@ jobs:
55
55
  uses: trajectonomics/cicd/.github/workflows/pr-title.yml@v1
56
56
  ```
57
57
 
58
+ ```yaml
59
+ # .github/workflows/release.yml (keep this filename: npm trusted publishing validates it)
60
+ name: Release
61
+ on:
62
+ push:
63
+ branches: [main]
64
+ paths-ignore: ["**/*.md", ".agents/**", ".claude/**", ".github/**"]
65
+ workflow_dispatch:
66
+ inputs:
67
+ bump:
68
+ type: choice
69
+ options: [auto, patch, minor, major]
70
+ default: auto
71
+ permissions:
72
+ contents: write
73
+ id-token: write
74
+ jobs:
75
+ publish:
76
+ uses: trajectonomics/cicd/.github/workflows/publish.yml@v1
77
+ with:
78
+ bump: ${{ inputs.bump || 'auto' }}
79
+ ```
80
+
58
81
  `check.yml` installs Bun, runs `bun install --frozen-lockfile`, then `bun run check`. It takes
59
82
  optional `bun-version` and `script` inputs. `pr-title.yml` requires a conventional-commit PR title.
83
+ `publish.yml` is described under Releasing.
60
84
 
61
85
  ## Development
62
86
 
@@ -71,11 +95,28 @@ against it, so they exercise the same resolution path a consuming repo uses.
71
95
 
72
96
  ## Releasing
73
97
 
74
- PR titles are conventional commits because they pick the next version (`feat:` minor, `feat!:`
75
- major, anything else patch). Merges to `main` that change package files publish an alpha
76
- (dist-tag `alpha`). Running the **Release** workflow by hand on `main` publishes a stable version
77
- (dist-tag `latest`), creates the `vX.Y.Z` tag and GitHub release, and moves the floating `vX` tag
78
- that consumers pin to. To cut `1.0.0`, run it with `bump` set to `major`.
98
+ Every package uses the shared `publish.yml`, so releasing works the same everywhere:
99
+
100
+ | You do | Result |
101
+ | --- | --- |
102
+ | Merge to `main` (package files changed) | Publishes an **alpha**, e.g. `1.2.0-alpha.3`, dist-tag `alpha` |
103
+ | Run the **Release** workflow on `main` (Actions tab, Run workflow) | Publishes **stable**, dist-tag `latest`, then creates the tag `vX.Y.Z` and the GitHub release |
104
+
105
+ The workflow computes the version; `package.json` `version` is never edited by hand. `bump = auto`
106
+ reads the conventional-commit PR titles since the last stable tag (`feat:` minor, `feat!:` major,
107
+ anything else patch); choose `major` to cut `1.0.0`. The tag and GitHub release are created only
108
+ after npm accepts the version, so a failed publish leaves nothing behind. Run it from `main`;
109
+ any other branch fails before publishing.
110
+
111
+ From the command line: `gh workflow run release.yml --ref main -f bump=auto`.
112
+
113
+ In this repo a stable release also moves the floating `vX` tag that consumers pin to.
114
+
115
+ **New package, one time:** publish the first version by hand (`npm version 0.1.0-alpha.0
116
+ --no-git-tag-version`, then `npm publish --access public --tag alpha --provenance=false`, then
117
+ `git checkout package.json`). Then add a Trusted Publisher on npmjs.com: GitHub Actions, your
118
+ repository, workflow `release.yml`, **allow publish directly**, no environment. It must be validated by
119
+ one successful CI publish within two days.
79
120
 
80
121
  ## Documentation
81
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trajectonomics/tooling",
3
- "version": "0.1.0-alpha.0",
3
+ "version": "0.1.0-alpha.2",
4
4
  "description": "Shared Biome and TypeScript presets, GritQL plugins, and reusable GitHub Actions workflows for Trajectonomics",
5
5
  "license": "MIT",
6
6
  "repository": {