-
Notifications
You must be signed in to change notification settings - Fork 889
switch from CircleCI -> local release process #3054
Conversation
In theory it is possible to use Circle CI API call to confirm that build for supposed release commit hash is successful. For multiple versions tests I tried to use Docker, but on Windows there is problems on linking step during yarn install (no problems with npm). However Mac may not have this problem. |
Both interesting ideas @IllusionMH! I'll leave those experiments for a future PR though, this one is primarily to unblock us so we can add collaborators. Publishing improvements will definitely be possible though 😁 |
README.md
Outdated
5. Push your branch to GitHub and make a PR | ||
6. Once your PR is merged, wait for the tests to pass on CircleCI for develop | ||
7. Create a "Release" on GitHub with the proper tag version and notes from the changelog | ||
8. Run 'yarn run publish:local 4.1.0' (replace with the appropriate tag name for the release) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought you need --
to forward arguments to the script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that's only needed if you're trying to pass dash options (like passing -o
to your script or something like that)
scripts/npmPublish.sh
Outdated
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc | ||
chmod 0600 .npmrc | ||
if [[ $# -ne 1 ]]; then | ||
echo "usage: yarn run publish:local gitTagToPublish" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we grab this from echo 'console.log("./package.json").version' | node
or something similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm good point, I actually use $npm_package_version
below. Originally I was going to make us pass in an explicit commit hash (so you were sure of what version of code you were publishing)
I've deleted |
Warning: When this PR is merged
NPM_TOKEN
should be deleted from the CircleCI environment variables.Overview of change:
Switches from a GH/CircleCI based publishing flow to a local one. This allows us to add contributors to TSLint without giving them publishing/releasing permissions.
Is there anything you'd like reviewers to focus on?
Does the local publishing script seem reasonable? Does re-cloning the repo to a temporary directory seem reasonable? I tested the script myself, but obviously didn't publish an actual release.
Possible improvements to this PR:
publish:local
run the tests with multiple versions of TS.