Skip to content
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

Merged
merged 8 commits into from
Oct 20, 2023

Conversation

piotr-roslaniec
Copy link
Contributor

@piotr-roslaniec piotr-roslaniec changed the title chore(changesets): initialize changesets Setup changesets for the initial release Oct 19, 2023
Comment on lines 1 to 29
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id: changesets
uses: changesets/action@v1
with:
publish: pnpm run build
Copy link
Member

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 ?

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 - gotcha!

Copy link
Member

@derekpierre derekpierre Oct 19, 2023

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.

Copy link
Contributor Author

@piotr-roslaniec piotr-roslaniec Oct 19, 2023

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:

  1. It finds a change set and so it creates a PR with a proposed release
  2. It detects that PR from 1) was just merged so it publishes the new package to npm

Please see the action README for details

Copy link
Member

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.

@netlify
Copy link

netlify bot commented Oct 20, 2023

Deploy Preview for taco-nft-demo ready!

Name Link
🔨 Latest commit
🔍 Latest deploy log https://app.netlify.com/sites/taco-nft-demo/deploys/65325bd5f291b1142d28769e
😎 Deploy Preview https://deploy-preview-337--taco-nft-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 20, 2023

Deploy Preview for taco-demo ready!

Name Link
🔨 Latest commit
🔍 Latest deploy log https://app.netlify.com/sites/taco-demo/deploys/65325bd8f291b113fd287a34
😎 Deploy Preview https://deploy-preview-337--taco-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2023

Codecov Report

Merging #337 (0ac9035) into main (4a80f6d) will not change coverage.
The diff coverage is n/a.

@@           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           

@piotr-roslaniec piotr-roslaniec force-pushed the changesets branch 2 times, most recently from 1d1c881 to e802832 Compare October 20, 2023 10:34
@piotr-roslaniec piotr-roslaniec merged commit 28b07ba into nucypher:main Oct 20, 2023
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants