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
Introduce changesets
for npm version management
#420
Conversation
"block-template": patch | ||
--- | ||
|
||
Add `"private": true` to all three template `package.json` files |
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.
- How do I stop changesets trying to publish certain packages changesets/changesets#783
- https://github.com/changesets/changesets/blob/main/docs/config-file-options.md#ignore-array-of-packages
Alternatively, we can remove "packages/block-template/templates/*"
from package.json
→ workspaces
. Conceptually, templates are not packages as far as the monorepo is concerned. They are just file assets.
@@ -20,7 +20,7 @@ jobs: | |||
if: ${{ github.event.inputs.confirmation }} | |||
runs-on: ubuntu-20.04 | |||
steps: | |||
- run: echo "https://registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |||
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc |
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 hope this can fix
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in to https://registry.npmjs.org/
npm ERR! need auth You need to authorize this machine using `npm adduser`
https://github.com/blockprotocol/blockprotocol/actions/runs/2621063593
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'blockprotocol/blockprotocol' |
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.
What's this about? Isn't it always?
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 saw this if
in one repo that uses changesets
(not sure I remember which one). This is a protection against running the pipeline in a fork.
https://github.com/changesets/changesets
Instructions
Standard releases
Create N PRs with
.changeset/*.md
files in them (each file corresponds to a single CHANGELOG entry)Find latest PR named ‘version packages’ (e.g. Version Packages statelyai/xstate#3366)
Review and merge that PR
Wait for CI to pass
Enjoy new versions!
Snapshot releases
Run these commands locally:
This flow should improve once changesets/changesets#855 is released. In the meantime, I can add a new manual GitHub action for snapshot releases (perhaps, in a follow-up PR).
UPD: Two fixes in the initial setup
@changesets/changelog-github
dependency #423