Skip to content

docs(release): restore alpha publishing and docs deployment [Codex] - #355

Open
jderochervlk wants to merge 2 commits into
mainfrom
fix-release-publishing-docs
Open

docs(release): restore alpha publishing and docs deployment [Codex]#355
jderochervlk wants to merge 2 commits into
mainfrom
fix-release-publishing-docs

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Context

The CI workflow combined validation, packaging, and npm publishing, so every push to main created an alpha release. That made releases harder to control and kept publishing concerns coupled to the normal build.

Changes

  • keep validation and documentation generation in CI with Node.js 24
  • move alpha versioning, package creation, and npm publication into a dedicated release workflow
  • run the release workflow for pull requests to main with npm publish --dry-run
  • make manual release runs default to dry_run: true; publishing requires explicitly setting it to false
  • publish commit-specific prereleases to the alpha dist-tag through npm trusted publishing
  • scope GitHub Pages write permissions to the documentation deployment job
  • update README and documentation version metadata to use the alpha channel

@jderochervlk jderochervlk changed the title ci: restore alpha releases and docs deployment ci(release): restore alpha publishing and docs deployment [Codex] Sep 3, 2026
@jderochervlk
jderochervlk marked this pull request as ready for review September 3, 2026 13:28
@jderochervlk jderochervlk changed the title ci(release): restore alpha publishing and docs deployment [Codex] docs(release): restore alpha publishing and docs deployment [Codex] Sep 11, 2026
@brnrdog

brnrdog commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

@jderochervlk Can we actually decouple the release and publish steps from the build, and have them as a manually triggered workflow instead of on every push on main? From my personal experience, it saves a bit of headache some times.

@jderochervlk

Copy link
Copy Markdown
Collaborator Author

@jderochervlk Can we actually decouple the release and publish steps from the build, and have them as a manually triggered workflow instead of on every push on main? From my personal experience, it saves a bit of headache some times.

Sure, that makes sense.

@jderochervlk

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-12T15:26:25.948889Z 2535ba6 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2535ba61d0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +3 to +7
on:
pull_request:
branches:
- main
workflow_dispatch:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Trigger alpha publishing after main pushes

This workflow is triggered only for pull requests and manual dispatches. Since the same change removes the publishing steps from the main-push CI workflow, merging to main no longer publishes the commit-specific alpha release; releases occur only when someone manually dispatches this workflow, contrary to the restored main-branch release flow.

Useful? React with 👍 / 👎.

run: npm publish ./rescript-webapi-*.tgz --access public --tag alpha --dry-run

- name: Publish npm package
if: github.event_name == 'workflow_dispatch' && !inputs.dry_run

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict manual publishing to the main branch

When a caller dispatches this workflow with dry_run=false, they can select a feature-branch or tag ref, and checkout will package that selected ref. Because this condition checks only the event and input, such a run publishes that non-main code under the shared alpha tag; add an explicit main-ref restriction if releases are intended to remain main-branch-only.

Useful? React with 👍 / 👎.

Comment on lines +19 to +20
publish:
runs-on: ubuntu-latest

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate real publishes on successful validation

This standalone publish job installs dependencies and immediately packages the selected commit without running the repository's formatting, build, feature, test, or documentation checks, and it has no dependency on the CI workflow. A manual run with dry_run=false can therefore publish an alpha while CI is still running or after it has failed; run the validation steps here or trigger publishing only from a successful CI run.

Useful? React with 👍 / 👎.

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: "24"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Install an npm version that supports trusted publishing

node-version: "24" constrains Node.js but does not guarantee a compatible npm CLI. This workflow removes NODE_AUTH_TOKEN and relies entirely on npm trusted publishing, which requires npm 11.5.1 or later; with an older bundled npm, such as npm 11.4.2 in the inspected Node 24.15.0 toolchain, npm publish does not exchange the OIDC token and exits with ENEEDAUTH. Explicitly install or pin a supported npm version before publishing.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants