-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-release is tagged with latest tag #10
Comments
Hmm. The library just uses multiple release configs. Did you add the config to the top-level release config or to a release config of a library? |
@kreuzerk I just use I have lib called foundation and inside project.json I have this When I created branch beta and pushed to github it released the correct beta version of the lib but the tag was latest and not beta
|
Hi @kreuzerk and @devdanco, It looks as if the issue is in https://github.com/kreuzerk/nx-release/blob/main/libs/nx-release/src/executors/npm-publish/executor.ts#L14 because npm publish is called without the --tag option (https://docs.npmjs.com/cli/v10/commands/npm-publish#tag) Any updates on the issue? |
If you're on Nx 18, you can take advantage of Nx Release for the publishing step which allows you to specify a tag. I ended up tweaking the @semantic-release/exec plugin section of release config like so:
I also had to make a few changes to nx,json. I had to configure the release section and add the following to targetDefaults. Your configuration may differ based on how your workspace is structured.
Still have some more testing to do but so far it looks pretty good. |
@nivekcode I've prepared a Pull Request that could help resolving the issue that people in this thread encountered. Hope it helps :) #18 |
Hi, I'm a big fan of this library because it really helps me in configuring a monorepo with semantic release. However, I've encountered a single issue related to prereleases. In my release configuration, I've specified "beta" as a prerelease, but when I trigger a prerelease, the package gets released with the "latest" tag instead of "beta." Do you happen to know how I can set this up correctly, or is this possibly an issue specific to semantic release? Interestingly, I have a standard repository with a similar configuration, and I don't encounter this problem there. Thank you for your help!
Here it is how I specify branches in config:
branches: ['main', {name: 'beta', prerelease: true}]
The text was updated successfully, but these errors were encountered: