-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Github Actions example #540
Comments
Currently, there is an Open Issue to include an example with Github Actions on the readme. We use semver and ngx-deploy-npm (yes, we are using ourselves to publish our package to NPM). You can always go and see a production like examples of both technologies in action |
Quickly analyzing your CI, I would recommend using a reusable action to install your dependencies and use it whenever you need it. You can take this repo's set-up action as an example. |
I saw this production example, but confused what edit: i see https://github.com/bikecoders/ngx-deploy-npm/blob/main/packages/ngx-deploy-npm/project.json#L71-L77 but its quite confusing that version command also create release to npm. What about monorepo with more packages? |
Yes. It creates a version and, after that, if there is a new version, tries to publish that version to NPM. |
This might help you, a generic {
"name": "YOUR_LIB_NAME",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/YOUR_LIB_NAME/src",
"projectType": "library",
"targets": {
"deploy": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"postTargets": ["YOUR_LIB_NAME:deploy"],
"versionTagPrefix": "v"
}
}
},
"tags": []
} To publish you must run ExplanationTo publish a new version, you run the For instance, since your last deployment, there are only |
What I'm seeing other devs are using is creating the same The command would be |
Hey, i'm trying to setup this with github actions but im stucked on npm credentials.
https://github.com/xHyroM/things/blob/main/.github/workflows/release.yml
I know, its recommended to use https://github.com/jscutlery/semver and i have installed it, but want to figure this out and then somehow merge it. I'm really new using nx and don't know with it so much.
Some example of using github actions would be great and also with jscutlery's semver
The text was updated successfully, but these errors were encountered: