There are so many repeated steps when releasing a new version of a library. The tool semantic-release automates this process by pushing off the responsibility of your releases to continuous integration. Trust us, this will change your workflow for the better.
I'm having a problem on travis build. It stalls while launching the tests. I'm sure the -w flag is responsible so i removed it. I've pushed the changes to github, but when relaunching the build on travis, the test command still has the -w flag. How do i update the github project on travis. (tried removing and adding again w/ no success)
I actually recommend that your test
script not have the -w
flag (even though that's what I originally did in the video) and in your .travis.yml
, make sure that your script
runs npm run test
. I do in angular-formly
Good luck!
Hey! Thanks for the quick answer! Everything worked after waiting a bit (the new commit arrived and everything went green). Guess i'll wait for the commit to propagate next time :)
Hi Kent, thanks a lot for sharing this amazing library. I just have 2 steps that I'm struggling with.
I use gulp-header that reads my package.json to insert the correct version as annotations in my .min.js, however, semantic-release don't let any version into the package.json, do you have an alternative, for it? Thanks?
How would publish bower? Do I need to create a tag on my own? Thanks
Hi Leo! So... Two things
gulp-header
after semantic-release pre
. You'll see that I changed the semantic-release
script in angular-formly here. semantic-release pre
will set the version in package.json
.semantic-release
does create a tag for you, so it should just work out of the box.Hi Kent,
Many thanks for your reply.
Allright, I'll run semantic-release pre
, than gulp-header
. That's really cool. I just need to make sure all my PR helpers use the correct commit messages convention. (I found out you wrote a lib to force that, I'll try it)
I've read about replace bower to npm, however this won't be done to quickly. I'm still have many users from bower in my lib. I realized that created a tag. It should be fine though.
Awesome video btw!
Hi! Each time I run semantic-realease with --publish flag, I get the GitHub token error although the token is set. However, the script without this flag creates correct releases on GitHub while running in CI. But it misses to publish the package on npm so I have to set the version in package.json manually...
In case anyone runs into this error: ERR! semantic-release Error: Unable to find repo id for "{REPO_NAME_HERE}"
after selecting TravisCI in the setup, you might want to sign up for TravisCI first and then add the repo to your TravisCI dashboard.