-
Notifications
You must be signed in to change notification settings - Fork 23
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
Setup changesets
for the initial release
#337
Conversation
changesets
for the initial release
.github/workflows/publish.yml
Outdated
name: Publish | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
publish: | ||
name: Publish NPM package using changesets | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.1 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: 'pnpm' | ||
|
||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: Create release pull request or publish | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: pnpm run build |
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.
⚡
.github/workflows/publish.yml
Outdated
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: pnpm run build |
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.
Does this publish a taco npm package every push to main
? Should we use tags
?
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.
Not quite. This job will detect whether there was a change set generated (it resembles newsfragment
in nucypher
) and if there was any, it will create a new PR with a proposed release. This is why this job is called Create release pull request or publish
.
changesets
are not fully configured yet, I will resort to manual publishing for now.
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.
👍 - gotcha!
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.
Why not just call it Create release pull request
? or Create release pull request for publish
? The or
threw me off.
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.
Because when this action runs, there are two possible outcomes:
- It finds a change set and so it creates a PR with a proposed release
- It detects that PR from 1) was just merged so it publishes the new package to npm
Please see the action README for details
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.
Thanks for link. That makes sense now.
cc5f1a5
to
48f06c5
Compare
✅ Deploy Preview for taco-nft-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for taco-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
@@ Coverage Diff @@
## main #337 +/- ##
=======================================
Coverage 87.64% 87.64%
=======================================
Files 33 33
Lines 2493 2493
Branches 218 218
=======================================
Hits 2185 2185
Misses 278 278
Partials 30 30 |
1d1c881
to
e802832
Compare
changesets
for the initial release #309