Closed jkrems closed 9 years ago
cc @danmconrad @khoomeister
How does it know what the release branch is?
@khoomeister Default to master, optional config option. Maybe I should spell out the config options explicitly. Good point.
There was a revision where I also had "and after the release, you can push it to additional branches, e.g. you release from develop and push to develop and master". But then I thought - if you do the continuous releases whenever you merge a PR, splitting the two is kind of silly anyhow.
Moved to https://github.com/EndangeredMassa/npub/pull/50 so inline comments etc. work.
I'd like to spend some time on this module to make the flow a little smoother (and add some features that are a bit manual right now. In the end I'd like to end up with something like the following flow:
Configuration
package.json
publishConfig.registry
: Used bynpm
when publishing and also bynpub
when installing dependenciesprivate
: Iftrue
, the package shouldn't be published to any registry.publishConfig.license.exclude
: (deprecated) Usenpub.license.exclude
.npub
Settingsnpub
usesrc
combined with thenpub
section ofpackage.json
. Settings loaded viarc
override settings inpackage.json
.license.exclude
: An array of directories and/or files to ignore for the npub prep command.branch
: The branch to release from, defaults tomaster
.github.baseUrl
: The base url when talking to the Github API, defaults tohttps://api.github.com
.github.token
: A Github access token. Never check access tokens into version control.npm.publish
: Ifnpub
should be publishing the package tonpm
, defaults totrue
.Commands
npub publish [ <version> ]
Options
-t/--test command
: Alternate test suite command, default:npm test
--dry
: Don't actually publish or commit anything--yes
: Don't ask for confirmation, this allows to runnpub publish
as part of a CI build ofmaster
<version>
, one of:1.2.3
: Publish as a specific version numberpatch
,minor
,major
: Increment the existing version (likenpm version patch
would)npub
will try to deduce it from the Github PRs that were merged, usingsemver-minor
style labels.Steps
npub verify
)npub prep
)npub verify
)node_modules
npm install
usingpublishConfig.registry
if availablenpub verify
) - maybe not necessary..?package.json
with new version andCHANGELOG.md
with change listCHANGELOG.md
&package.json
v
, e.g.vX.Y.Z
)--yes
was used)npm publish
(unlessprivate: true
or publish is disabled, e.g. because the project uses CI to publish)The Github integration should fulfill the following requirements: