Commit c91170c
committed
tidy #24 [CI] Publish the npm package on tags via trusted publishing (Kocal)
This PR was merged into the main branch.
Discussion
----------
[CI] Publish the npm package on tags via trusted publishing
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
Adds a `Release on NPM` workflow that publishes ``@symfony`/reprise` to npm when a `v*.*.*` tag is pushed. It's modeled closely on the battle-tested `symfony/ux` workflow.
- **Trusted publishing (OIDC)**: no `NPM_TOKEN`, just `id-token: write`. npm generates provenance automatically. Requires the package's trusted publisher to be configured on npmjs.com to point at this repo and the `release-on-npm.yaml` workflow.
- **Guardrails from symfony/ux**: pinned action SHAs, `persist-credentials: false`, a pinned `npm@11.16.0` (OIDC needs >= 11.5.1), `pnpm install --frozen-lockfile`, and `pnpm publish --recursive --access public --no-git-checks --provenance`.
- **Adapted for Reprise**: the tag pattern is `v*.*.*`, the "tag is on a release branch" check targets `main` (Reprise has no `X.x` branches), and there's no committed-dist verification step -- Reprise gitignores `assets/dist` and builds it in CI, so there's nothing committed to diff against.
`--recursive` only reaches ``@symfony`/reprise`: the monorepo root and the `playground` package are both `private`.
Commits
-------
904959b [CI] Publish the npm package on tags via trusted publishing1 file changed
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
0 commit comments