Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

# Toolchain, release, and distribution
/rust-toolchain.toml @Teakowa
/release-please-config.json @Teakowa
/dist/ @Teakowa
/install.sh @Teakowa
/install.ps1 @Teakowa
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,9 @@ jobs:
- name: Test R2 retention pruning
if: matrix.channel == 'install.sh'
run: python scripts/test-prune-r2.py
- name: Test release version stamping
if: matrix.channel == 'install.sh'
run: python scripts/test-stamp-version.py
- name: Test install.ps1 (channel)
if: matrix.channel == 'install.ps1'
shell: pwsh
Expand Down
56 changes: 0 additions & 56 deletions .github/workflows/release-please.yml

This file was deleted.

138 changes: 27 additions & 111 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,70 +119,13 @@ jobs:
# Nightly is already CI-gated by its workflow_run trigger; stable needs
# the same-revision gate here because nothing else in the workflow proves
# the tagged revision passed the required checks.
- name: Require CI success on the release revision
- name: Wait for CI on the release revision
if: steps.resolve.outputs.channel == 'stable'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
RELEASE_COMMIT: ${{ steps.resolve.outputs.commit }}
REQUIRED_CHECKS: CI result
run: |
set -euo pipefail
deadline=$(( SECONDS + 5400 ))
pending_file="$(mktemp)"
trap 'rm -f "$pending_file"' EXIT
if [ "$REQUIRED_CHECKS" != "${REQUIRED_CHECKS//$'\n'/,}" ]; then
echo "REQUIRED_CHECKS must be a single comma-separated line" >&2
exit 1
fi
IFS=',' read -r -a names <<< "$REQUIRED_CHECKS"
count=0
for raw in "${names[@]}"; do
name="$(echo "$raw" | xargs)"
if [ -n "$name" ]; then
printf '%s\n' "$name" >> "$pending_file"
count=$(( count + 1 ))
fi
done
if [ "$count" -eq 0 ]; then
echo "REQUIRED_CHECKS resolved to an empty set; refusing to publish" >&2
exit 1
fi
while [ -s "$pending_file" ]; do
if [ "$SECONDS" -ge "$deadline" ]; then
echo "Timed out waiting for release-revision checks:" >&2
cat "$pending_file" >&2
exit 1
fi
sleep 30
keep=""
while IFS= read -r name; do
[ -z "$name" ] && continue
if ! out="$(gh api --method GET "repos/$GITHUB_REPOSITORY/commits/$RELEASE_COMMIT/check-runs" \
-f "check_name=$name" \
--jq '(.check_runs | sort_by(.id) | last) // {status: "missing", conclusion: "", html_url: ""} | "\(.status) \(.conclusion // "-") \(.html_url // "-")"' 2>&1)"; then
echo "check-runs API call failed for '$name': $out" >&2
exit 1
fi
status="${out%% *}"
rest="${out#* }"
conclusion="${rest%% *}"
case "$status" in
completed)
if [ "$conclusion" = "success" ]; then
echo "PASS $name"
else
echo "FAIL $name concluded '$conclusion' ($out)" >&2
exit 1
fi ;;
*)
keep="${keep}${name}"$'\n'
echo "WAIT $name ($status)" ;;
esac
done < "$pending_file"
printf '%s' "$keep" > "$pending_file"
done
echo "All required checks succeeded on $RELEASE_COMMIT"
uses: lewagon/wait-on-check-action@369769072fe522a3a8a85c03c96af1e5242a1994 # v1.9.1
with:
ref: ${{ steps.resolve.outputs.commit }}
check-name: CI result
repo-token: ${{ github.token }}

# Stable runs serialize through the `wright-stable` concurrency group, so
# this check runs inside the serialized section: an older tag pushed after
Expand Down Expand Up @@ -221,11 +164,9 @@ jobs:
with:
ref: ${{ steps.resolve.outputs.commit }}

- name: Set up Rust
uses: wrightkit/.github/.github/actions/setup-rust@main
with:
toolchain: 1.97.1

# The checked-in version is a placeholder. A stable release takes its
# version from the tag; every job that builds stamps it with
# `scripts/stamp-version.py`. Nightlies keep the placeholder.
- name: Verify release identity
id: identity
shell: bash
Expand All @@ -235,20 +176,10 @@ jobs:
RELEASE_TAG: ${{ steps.resolve.outputs.tag }}
run: |
set -euo pipefail
version="$(cargo metadata --locked --no-deps --format-version 1 |
jq -r '.packages[] | select(.name == "wright-cli") | .version')"
if [[ -z "$version" || "$version" == null ]]; then
echo "wright-cli workspace version is unavailable" >&2
exit 1
fi
checked_in_version="$(tr -d '\r\n' < version.txt)"
if [[ "$checked_in_version" != "$version" ]]; then
echo "version.txt '$checked_in_version' does not match workspace version '$version'" >&2
exit 1
fi
if [[ "$RELEASE_CHANNEL" == stable && "$RELEASE_TAG" != "v$version" ]]; then
echo "tag $RELEASE_TAG does not match workspace version $version" >&2
exit 1
if [[ "$RELEASE_CHANNEL" == stable ]]; then
version="${RELEASE_TAG#v}"
else
version="$(tr -d '\r\n' < version.txt)"
fi
{
echo "channel=$RELEASE_CHANNEL"
Expand Down Expand Up @@ -300,6 +231,9 @@ jobs:
with:
python-version: "3.12"

- name: Stamp release version
run: python scripts/stamp-version.py "$RELEASE_VERSION"

- name: Set up Rust
uses: wrightkit/.github/.github/actions/setup-rust@main
with:
Expand Down Expand Up @@ -356,6 +290,9 @@ jobs:
with:
ref: ${{ needs.release-identity.outputs.commit }}

- name: Stamp release version
run: python3 scripts/stamp-version.py "$RELEASE_VERSION"

- name: Set up Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
Expand Down Expand Up @@ -518,6 +455,8 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ needs.release-identity.outputs.commit }}
- name: Stamp release version
run: python3 scripts/stamp-version.py "$RELEASE_VERSION"
- name: Set up Rust
uses: wrightkit/.github/.github/actions/setup-rust@main
with:
Expand Down Expand Up @@ -620,36 +559,13 @@ jobs:
exit 1
fi

draft="$(gh release view "$RELEASE_TAG" \
gh release create "$RELEASE_TAG" release/* attach/* \
--repo "$GITHUB_REPOSITORY" \
--json isDraft \
--jq '.isDraft' 2>/dev/null || true)"
if [[ -z "$draft" ]]; then
gh release create "$RELEASE_TAG" \
--repo "$GITHUB_REPOSITORY" \
--verify-tag \
--target "$RELEASE_COMMIT" \
--title "$RELEASE_TAG" \
--generate-notes \
--draft
draft=true
elif [[ "$draft" == true ]]; then
echo "found existing draft release $RELEASE_TAG"
else
echo "release $RELEASE_TAG already exists as public; refusing to continue" >&2
exit 1
fi

if [[ "$draft" == true ]]; then
gh release upload "$RELEASE_TAG" release/* attach/* \
--repo "$GITHUB_REPOSITORY" \
--clobber
gh release edit "$RELEASE_TAG" \
--repo "$GITHUB_REPOSITORY" \
--verify-tag \
--draft=false \
--latest
fi
--verify-tag \
--target "$RELEASE_COMMIT" \
--title "$RELEASE_TAG" \
--generate-notes \
--latest

publish-npm:
name: Publish @wrightkit/core to npm
Expand Down
3 changes: 0 additions & 3 deletions .release-please-manifest.json

This file was deleted.

6 changes: 4 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ support claims require real-project validation in addition to focused tests.
## Delivery

- Keep commits focused and do not mix unrelated repository changes.
- After you complete a requirement, decide whether the default branch now holds
a change worth releasing; if so, release it as described in
[`docs/release.md`](docs/release.md#creating-a-release).
- PRs that advance shipped owner dependency pins must use the `deps:`
Conventional Commit type so the changed product graph enters the normal Wright
patch-release flow; do not classify those updates as ordinary `chore:` work.
Conventional Commit type so the changed product graph counts as a released change; do not classify those updates as ordinary `chore:` work.
- Review-time verification results, including hashes, residual counts, and
pass/fail status, must come from the test/CI run under review. Never hand-write
or manually refresh a committed test-result file; put results in the PR
Expand Down
Loading
Loading