diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f70d8c..fa42b02 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,13 +7,28 @@ on: permissions: {} jobs: + tag: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v7 + - name: Tag matches package version + run: | + version=$(node -p "require('./packages/leeway/package.json').version") + if [ "${GITHUB_REF_NAME#v}" != "$version" ]; then + echo "::error::tag $GITHUB_REF_NAME does not match packages/leeway version $version" + exit 1 + fi + ci: + needs: tag uses: ./.github/workflows/ci.yml permissions: contents: read publish: - needs: ci + needs: [tag, ci] runs-on: ubuntu-latest permissions: contents: write @@ -21,13 +36,6 @@ jobs: pull-requests: read steps: - uses: actions/checkout@v7 - - name: Tag matches package version - run: | - version=$(node -p "require('./packages/leeway/package.json').version") - if [ "${GITHUB_REF_NAME#v}" != "$version" ]; then - echo "::error::tag $GITHUB_REF_NAME does not match packages/leeway version $version" - exit 1 - fi - uses: pnpm/action-setup@v6 - uses: actions/setup-node@v7 with: diff --git a/packages/leeway/README.md b/packages/leeway/README.md index 13391cc..edbedb0 100644 --- a/packages/leeway/README.md +++ b/packages/leeway/README.md @@ -86,9 +86,10 @@ A folder's range comes from the machine's pools, 21000-29999 unless set otherwis [`leeway pools`](#leeway-pools-set-start-end--reset), and recorded in the registry, `~/.leeway/ranges.json`. Every repo on the machine shares both, so no two folders get the same ports. -- A range is exactly as wide as the catalogue. Adding, reordering or renaming port names moves no port; removing one moves only the ports - that fell outside the narrower range. -- A folder keeps its range while its ports are free (or held by its own servers). Otherwise the range moves to free ports and leeway warns: +- A range is exactly as wide as the catalogue. Reordering port names or renaming one moves no port, and neither does adding one while the + wider range fits; removing one moves only the ports that fell outside the narrower range. +- A folder keeps its range until `leeway move`, or until the range no longer fits: it leaves its pool, the OS refuses one of its ports, or + a grown catalogue reaches into another folder's range or onto a port in use. Then the range moves to free ports and leeway warns: restart anything still on the old ports. - leeway can't tell the folder's own servers from something else on one of its ports, so a claim that finds one in use keeps the range and names the holder with the fix: `leeway kill` for a server of this folder that should not still be running, [`leeway move`](#leeway-move) for anything else.