👷 Announce releases on Bluesky#6959
Conversation
Add a workflow that triggers on `release: published` and posts a short announcement on Bluesky linking to the GitHub Release discussion that softprops/action-gh-release auto-creates under the `announcements` category. Skips when the release has no linked discussion. Requires `BLUESKY_IDENTIFIER` and `BLUESKY_APP_PASSWORD` repository secrets. https://claude.ai/code/session_01586yR9jMEa8y3yT8RmkXcQ
Replace the hand-rolled `fetch` + manual UTF-8 byte-offset facet logic with the official `@atproto/api` client. RichText.detectFacets handles URL detection, and AtpAgent.login/post wrap the AT Protocol calls. Adds `@atproto/api` to root devDependencies (locked in pnpm-lock.yaml) and installs it in the workflow with `pnpm install --frozen-lockfile`. https://claude.ai/code/session_01586yR9jMEa8y3yT8RmkXcQ
Address review feedback on the Bluesky announcer script: - Convert from CommonJS (.cjs) to ESM (.mjs) and replace `main()` with top-level await — unhandled rejections naturally exit non-zero. - Drop the unused `BLUESKY_SERVICE` env var, hard-code bsky.social. - Build a friendly release label from the tag itself (`v3.5.0` → `fast-check v3.5.0`, `vitest/v1.2.0` → `@fast-check/vitest v1.2.0`) instead of picking between RELEASE_NAME and RELEASE_TAG. - Use explicit `=== undefined || === ''` checks via a `requireEnv` helper rather than truthiness coercion. https://claude.ai/code/session_01586yR9jMEa8y3yT8RmkXcQ
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
@fast-check/ava
fast-check
@fast-check/jest
@fast-check/packaged
@fast-check/poisoning
@fast-check/vitest
@fast-check/worker
commit: |
Switch from `AtpAgent` + `agent.login()` to `CredentialSession` + `new Agent(session)`. The README now flags `AtpAgent.login` as legacy and points new code at the `SessionManager`-based pattern. https://claude.ai/code/session_01586yR9jMEa8y3yT8RmkXcQ
- Drop the file-level header comment and the JSDoc blocks; the names and shape of the script speak for themselves. - Move helper functions to the bottom of the file under a `// Helpers` banner, leaving the main flow as the first thing a reader sees. Function declarations hoist, so this works under top-level await. https://claude.ai/code/session_01586yR9jMEa8y3yT8RmkXcQ
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6959 +/- ##
=======================================
Coverage 94.89% 94.89%
=======================================
Files 212 212
Lines 5951 5951
Branches 1564 1565 +1
=======================================
Hits 5647 5647
Misses 296 296
Partials 8 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…lease-action-bwFRU
⏱️ Benchmark ResultsClick to expand |
## Description > AI-agent disclosure: this PR was authored by an automated agent (Claude Code) and has not been line-by-line reviewed by a human before submission. Releases of fast-check and its sibling packages will now actually be announced on Bluesky: the "Announce Release on Bluesky" workflow added in #6959 has never fired once. The announcement now goes out when the maintainer dispatches the Create Release workflow, right after the draft release is created and the tag pushed, and the wording is adjusted to match that timing — `🚀 New release on its way: fast-check v4.9.0`, followed by a link to the release notes. The linked release page goes live a few minutes later, once the publish pipeline flips the draft to published. Dry runs of Create Release skip the post. Why it never fired: the workflow listened to `release: published`, but releases are flipped from draft to published by `softprops/action-gh-release` inside the publish jobs using the default `GITHUB_TOKEN`, and GitHub suppresses events created with that token from triggering other workflows. Its `discussion_url != ''` guard was dead too, since #6975 dropped discussion creation on releases. Design: `announce-release-bluesky.yml` becomes a reusable `workflow_call` taking the release tag, invoked from a new `announce-release` job in `create-release.yml` — which now re-exports the tag computed by its changelog-extract step as a job output. Alternatives considered and rejected: publishing releases with a PAT so `release: published` fires (a new long-lived secret to manage), or wiring the announcement into the seven publish jobs of `build-status.yml` (couples the social post to the publish pipeline). Anchoring on the human-dispatched Create Release needs no new secret and leaves `build-status.yml` untouched. The Bluesky secrets are declared and passed explicitly to the called workflow rather than via `secrets: inherit`, so only the three `BLUESKY_*` secrets are in its reach. Impact level: patch, CI-only — no published package changes, hence no changeset. The PR stays focused on a single concern: making the Bluesky announcement flow fire. No automated tests were added: the change is workflow glue around the existing, already smoke-tested `post-bluesky.mjs`; YAML validity and the tag→URL/label mapping (including slashed tags like `packaged/v0.7.1`) were verified locally. <!-- Add any additional context here --> ## Checklist — _Don't delete this checklist and make sure you do the following before opening the PR_ - [ ] I have a full understanding of every line in this PR — whether the code was hand-written, AI-generated, copied from external sources or produced by any other tool - [ ] I flagged the impact of my change (minor / patch / major) either by running `pnpm run bump` or by following the instructions from the changeset bot - [ ] I kept this PR focused on a single concern and did not bundle unrelated changes - [ ] I followed the [gitmoji](https://gitmoji.dev/) specification for the name of the PR, including the package scope (e.g. `🐛(vitest) Something...`) when the change targets a package other than `fast-check` - [ ] I added relevant tests and they would have failed without my PR (when applicable) <!-- PRs not checking all the boxes may take longer before being reviewed --> <!-- More about contributing at https://github.com/dubzzz/fast-check/blob/main/CONTRIBUTING.md --> --------- Co-authored-by: Claude <[email protected]>
Description
Adds a new GitHub Actions workflow that automatically publishes a short
Bluesky post each time a release is published, linking back to the
GitHub Release discussion that
softprops/action-gh-releasealreadycreates under the
announcementscategory. The post text follows theshape
🚀 New release: <label>\n\nRead the announcement and changelog: <url>,with
<label>derived from the git tag (v3.5.0→fast-check v3.5.0,vitest/v1.2.0→@fast-check/vitest v1.2.0), so it works uniformlyfor
fast-checkand the six sibling packages. The workflow skips whenthe release has no linked discussion. Two new repository secrets are
required:
BLUESKY_IDENTIFIER(the bot's Bluesky handle) andBLUESKY_APP_PASSWORD(an App Password generated in Bluesky settings);without them the job fails loudly so the issue surfaces in CI rather
than silently dropping announcements.
The workflow is a standalone file triggered on
release: publishedrather than an extra step appended to each of the seven
publish_package_*jobs inbuild-status.yml— this keeps the socialannouncement decoupled from the publishing pipeline, fires exactly once
per release event, and reuses
release.discussion_urlstraight fromthe webhook payload (no extra GitHub API call). The post script lives
in
.github/workflows/scripts/post-bluesky.mjs(ESM with top-levelawait, matching the existing
.cjshelpers in that folder) and usesthe official
@atproto/apiclient (CredentialSession+Agent+RichText) —RichText.detectFacetshandles URL facet construction,which is otherwise tricky because Bluesky requires UTF-8 byte offsets
rather than character offsets.
@atproto/apiis added to rootdevDependenciesso it's locked inpnpm-lock.yaml, and the workflowruns
pnpm install --frozen-lockfilebefore invoking the script,matching the project's existing supply-chain hardening (frozen
lockfile, pinned action SHAs). Impact level: patch — CI-only addition,
no behavioral change to any published package. Scope is single-concern
(workflow + its supporting script + the new dev dependency it pulls
in). No automated tests are added: the surface is a thin glue script
against the Bluesky API and GitHub release events, neither of which is
practical to test in this repo's vitest suite; the script was instead
smoke-tested locally to confirm env-var validation, tag-to-label
formatting for all seven packages, ESM loading of
@atproto/api, andthat the credential session reaches the AT Protocol endpoint.
Checklist
— Don't delete this checklist and make sure you do the following before opening the PR
pnpm run bumpor by following the instructions from the changeset bot🐛(vitest) Something...) when the change targets a package other thanfast-check