-
Notifications
You must be signed in to change notification settings - Fork 74
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
custom publish command #9
Comments
That seems like a do-able feature. Do you have time to submit a PR? |
@nosovk I think there is an easier way, and kind of out of scope. It can be achieved with too much orchestration in all of the 3 ways this package supports. Github workflows: (a single line added). ---
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- run: ./path/to/custom/build-script.sh
- uses: JS-DevTools/npm-publish@v1
with:
token: YOUR_NPM_AUTH_TOKEN_HERE
package: ./path/to/custom/package.json Javascript package (a single line added). const npmPublish = require("@jsdevtools/npm-publish");
// Do custom build stuff
const { execSync } = require('child_process');
execSync('./path/to/custom/build-script.sh');
// Run npm-publish with options
await npmPublish({
package: "./path/to/custom/package.json",
token: "YOUR_NPM_AUTH_TOKEN_HERE"
}); CLI (a single line added). $ ./path/to/custom/build-script.sh && \
npm-publish --token=YOUR_NPM_AUTH_TOKEN_HERE ./path/to/custom/package.json I'm using this "technique" myself in this project. |
I think the requested functionality is either already available, via the Going to close this issue as already possible and/or duplicate. I think if you have more complex needs than those option are able to / will be able to service, you should be writing your own deploy logic rather than relying on this action |
unfortunately for TS projects, especially Angular libs we often have to opt out from standard
npm publish
to custom scriptnpm run publish
.See topic: https://stackoverflow.com/questions/38935176/how-to-npm-publish-specific-folder-but-as-package-root
often proposed workaround is using alternate publish script, like
npm run publish
that will do all the hacks.Could you please add env variable
npmpublish
that will allow to overridenpm publish
command with another non standard command.The text was updated successfully, but these errors were encountered: