Skip to content

ci: trigger npm publish on release published and set dist-tag - #768

Merged
UlisesGascon merged 1 commit into
masterfrom
fix/npm-publish-trigger
Sep 8, 2026
Merged

ci: trigger npm publish on release published and set dist-tag#768
UlisesGascon merged 1 commit into
masterfrom
fix/npm-publish-trigger

Conversation

@UlisesGascon

@UlisesGascon UlisesGascon commented Sep 8, 2026

Copy link
Copy Markdown
Member

Main Changes

  • Use npm tags based on package version (using semver regex)
  • trigger on published release (not created)

@UlisesGascon UlisesGascon self-assigned this Sep 8, 2026
@UlisesGascon
UlisesGascon marked this pull request as draft September 8, 2026 09:55
@UlisesGascon
UlisesGascon force-pushed the fix/npm-publish-trigger branch from 106460b to e7e0c6b Compare September 8, 2026 10:01
@UlisesGascon UlisesGascon changed the title fix(ci): trigger npm publish on release published and set dist-tag from semver Fix npm CI publication (triggers and tags) Sep 8, 2026
@UlisesGascon
UlisesGascon marked this pull request as ready for review September 8, 2026 10:02
@UlisesGascon

Copy link
Copy Markdown
Member Author

I will merge it and re-create the 1.20.7 release to test it out

@UlisesGascon UlisesGascon changed the title Fix npm CI publication (triggers and tags) ci: trigger npm publish on release published and set dist-tag Sep 8, 2026
@UlisesGascon
UlisesGascon merged commit aa9889b into master Sep 8, 2026
37 checks passed
@UlisesGascon
UlisesGascon deleted the fix/npm-publish-trigger branch September 8, 2026 10:04
@Phillip9587

Copy link
Copy Markdown
Member

@UlisesGascon

Copy link
Copy Markdown
Member Author

It worked as expected: https://github.com/expressjs/body-parser/actions/runs/34215333441/job/102025635884

image

I would prefer using tags as @blakeembrey does: jshttp/content-disposition@master/.github/workflows/release.yml

I always produce releases as I like to include the auto-generated notes (to notify the people around shipped changes). If we trigger npm publications on tags we might forget to do releases as is a manual step but I am open to change it if we believe is better. Also not all the packages use v* on the tag names (mostly do but not all, ideally in the future all active branches will use v*).

@blakeembrey

Copy link
Copy Markdown
Member

I always produce releases as I like to include the auto-generated notes

I believe you could create a draft release as the final step, that would be really neat to have.

If we trigger npm publications on tags we might forget to do releases as is a manual step

I went with tags to avoid the indeterminate timeline between the tag and actual release. Especially since we wanted to use environments in GitHub to authorize the release first, and another step in NPM with staging, it could mean a while between starting the releasing and having it be available.

Also not all the packages use v* on the tag names

It's what npm version does, should probably just switch to be clearer.

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.

3 participants