ci: a package's shipped files don't change under a version that is out (#1131)
A version is packed once (dist keeps its first tarball, npm won't take it twice, and magpie updates by version), so a change shipped without a bump reaches no one. #1095 did that to astudio 0.2.2. scripts/bumped.mjs <base> diffs packages/ against base and names each package whose packed files (npm pack --dry-run) changed with its version the same. README.md is left out: magpie reads it from dist's index.json, rewritten every run. bumped.yml runs it on each pull request (base sha) and each push to main (event.before). Run: bun test scripts/bumped.test.mjs, 3 pass (mica). Broken by hand: with astudio set back to 0.2.2, `bun scripts/bumped.mjs a2af9d2d~1` fails naming packages/astudio@0.2.2: index.mjs; at 0.2.3 it passes. Not tried: the workflow itself, until this push runs it.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# A package whose shipped files change keeps nothing of the change unless
|
||||
# its version changes too (scripts/bumped.mjs, plugins#1131). Runs on each
|
||||
# pull request and on each push to main, against what it is based on.
|
||||
name: bumped
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
bumped:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
- name: versions raised
|
||||
run: bun scripts/bumped.mjs "${{ github.event.pull_request.base.sha || github.event.before }}"
|
||||
Reference in New Issue
Block a user