Skip to content

Automatically publish dev builds after PR merges and tag builds#158

Open
fhammerschmidt wants to merge 1 commit into
rescript-lang:masterfrom
fhammerschmidt:automated-npm-publishing
Open

Automatically publish dev builds after PR merges and tag builds#158
fhammerschmidt wants to merge 1 commit into
rescript-lang:masterfrom
fhammerschmidt:automated-npm-publishing

Conversation

@fhammerschmidt

Copy link
Copy Markdown
Member

No description provided.

@fhammerschmidt fhammerschmidt requested review from cknitt and tsnobip July 7, 2026 16:39

@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: 3f557f5fdc

ℹ️ 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 +15 to +17
concurrency:
group: npm-publish-master
cancel-in-progress: false

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 Separate release and dev concurrency queues

Because every dev and release publish uses the same concurrency group, GitHub's concurrency behavior keeps at most one running and one pending run, and a newer queued run cancels any existing pending run. If a vX.Y.Z tag push is pending behind a dev publish and another merge/tag event arrives before it starts, the pending release run is canceled and there is no later trigger for that tag, so the npm latest release is skipped; use separate groups for tags/dev builds or a real queue.

Useful? React with 👍 / 👎.

Comment on lines +4 to +6
pull_request:
branches: [ master ]
types: [ closed ]

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 dev publishes from master pushes

When a merged PR was opened from a fork, this still runs as a pull_request event from a fork. GitHub's permissions docs say forked pull_request runs other than pull_request_target have write permissions downgraded, and id-token: write is required for npm trusted publishing to fetch an OIDC token, so external-contributor merges won't be able to publish the dev package under the default fork settings. Triggering dev publishes on push to master uses the trusted merged commit and preserves OIDC.

Useful? React with 👍 / 👎.

@tsnobip tsnobip left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

except from the things raised by codex, I think this looks good!

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