Comments (14)
Hey!
I'm not sure if that is the intended setup for the NX workspaces. I think that usually, the directory name should match the project name.
I'll see if I can tackle this in the next release, although it seems like a low-priority issue for now.
from nx-semantic-release.
Hi,
I am experiencing the same issue with npmPublish:false but seems the names are ok. My .nxrelease.json configuration file is set up as follows:
{
"changelog": true,
"npm": true,
"github": false,
"repositoryUrl": "ssh://[email protected]:7999/monorepo.git",
"outputPath" : "${WORKSPACE_DIR}/dist",
"buildTarget": "build",
"branches": ["master"]
}
in .npmrc registry set to company npm registry.
I run it with npx nx affected --base=master --target=semantic-release --parallel=false
I have 2 packages in nx monorepo and the following target
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release"
}
However, when I run the release process, the package is not being published to the npm registry. Instead, I see the following log message:
[semantic-release] [@semantic-release/npm] › ℹ Skip publishing to npm registry as npmPublish is false
I have tried running nx-semantic-release in debug mode, but I didn't find any relevant errors or warnings related to publishing the package.
Could you please help me understand why the package is not being published, even though the npm option is set to true in my configuration? Is there any additional configuration or steps that I need to follow to ensure the package is published correctly?
Edit:
Disregard my comment, outputPath was wrong.
My apologies.
from nx-semantic-release.
I have a similar issue, I'm getting:
Skip publishing to npm registry as npmPublish is [secure]
my .nxrelease.jon
{ "changelog": true, "npm": true, "github": false, "repositoryUrl": "https://github.XXXXXX.com/clover/web-lib-sprout-design-system", "branches": [ "master" ] }
I've searched for this error, but came up with nothing.
Do you have any suggestions on what I could look for?
from nx-semantic-release.
from nx-semantic-release.
In general, you can avoid running this command: npx nx run-many --all --target build
You just need to fix your .nxreleaserc.json
change from
"buildTarget": "build",
to
"buildTarget": "${PROJECT_NAME}:build",
Then the build
target will be called automatically
example of my .nxreleaserc.json
{
"repositoryUrl": "[email protected]:XXX/YYY.git",
"npm": true,
"github": true,
"changelog": false,
"outputPath": "dist/${PROJECT_DIR}",
"buildTarget": "${PROJECT_NAME}:build",
"tagFormat": "${PROJECT_NAME}-v${VERSION}",
"commitMessage": "chore(release): ${nextRelease.gitTag} [skip ci]\n\n${nextRelease.notes}",
"branches": [
"main"
]
}
from nx-semantic-release.
from nx-semantic-release.
@daniel-clover I'm not a developer of this repo :D
I just ran into the same problem :)
from nx-semantic-release.
@daniel-clover I didn't see Skip publishing to npm registry as npmPublish is [secure]
in my logs. So maybe this is something else on your side.
In each package.json
I have
"publishConfig": {
"registry": "https://npm.pkg.github.com",
"access": "restricted"
},
from nx-semantic-release.
from nx-semantic-release.
@daniel-clover ps.
fix
"commitMessage": "chore(release): ${nextRelease.gitTag} [skip ci]\\n\\n${nextRelease.notes}",
to
"commitMessage": "chore(release): ${nextRelease.gitTag} [skip ci]\n\n${nextRelease.notes}",
from nx-semantic-release.
from nx-semantic-release.
@daniel-clover try to copy options from .nxreleaserc.json
to concrete project.json
something like this
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release"
"options": {
"github": true,
"changelog": false,
"npm": true,
"buildTarget": "nx-js:build",
"outputPath": "dist/libs/nx/js",
"tagFormat": "${PROJECT_NAME}-v${VERSION}"
}
}
change nx-js
to your project
name everywhere
from nx-semantic-release.
@daniel-clover try to copy options from
.nxreleaserc.json
to concreteproject.json
something like this
"semantic-release": { "executor": "@theunderscorer/nx-semantic-release:semantic-release" "options": { "github": true, "changelog": false, "npm": true, "buildTarget": "nx-js:build", "outputPath": "dist/libs/nx/js", "tagFormat": "${PROJECT_NAME}-v${VERSION}" } }change
nx-js
to yourproject
name everywhere
I can confirm that this works.
Before I had this configuration in the global .nxreleaserc.json:
"buildTarget": "${PROJECT_NAME}:build",
"outputPath": "dist/${PROJECT_DIR}",
I updated this to use the specific project.json files.
"options": {
"buildTarget": "projectname:build",
"outputPath": "dist/libs/projectname"
}
The error is misleading and an explicit warning/errorcould fix this.
from nx-semantic-release.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 3 days.
from nx-semantic-release.
Related Issues (20)
- outputPath not being used? HOT 1
- MaxBufferError when running semantic-release on 12 projects HOT 2
- Enhancing nx-semantic-release to Accurately Detect Changes in Merge Commits for Release Generation HOT 4
- `preset` configuration option from config file gets overwritten by the executor default property HOT 1
- Assets are not uploading during release HOT 4
- BUG: Missing dependency on `es6-weak-map` prevents the module from working HOT 5
- @semantic-release/gitlab support HOT 4
- Skip publishing as npmPublish is [secure] HOT 6
- internal dependencies bumps HOT 1
- Invalid host defined options HOT 2
- Add support for single version for all packages HOT 3
- analyzeCommits fails to Error: spawn EBADF HOT 1
- New projects analyze all previous commits HOT 2
- Tag format not being respected? HOT 2
- Unknown branch name appended to release tag and tilte HOT 2
- Unable to release hotfix versions for remote apps in Nx Monorepo HOT 3
- Conditionally load plugin per package ? HOT 2
- Honor "dependsOn" configuration for build target HOT 2
- Plugin name incorrectly logged HOT 7
- Please update @semantic-release/npm version HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx-semantic-release.