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

Add changeset tag to custom publishing section of README #271

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mholta
Copy link

@mholta mholta commented Mar 1, 2023

Why is this pull request needed?

Based on #269.

What does this pull request change?

Add simple example of custom publishing workflow that produces GitHub Releases and Git tags.

@changeset-bot
Copy link

changeset-bot bot commented Mar 1, 2023

⚠️ No Changeset found

Latest commit: 9b099e6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gtjamesa
Copy link

gtjamesa commented Nov 8, 2023

This PR definitely would have saved me reading through the source code

@helloint
Copy link

helloint commented Dec 4, 2024

why is this not being merged?

@hirasso
Copy link

hirasso commented Dec 23, 2024

Is changesets still maintained?

@@ -155,6 +157,9 @@ jobs:
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# Include this to create GitHub releases and Git tags
# publish: yarn changeset tag
Copy link
Member

Choose a reason for hiding this comment

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

tbf - I think I have successfully used Changesets with custom release scripts like this:

      - name: Create Release Pull Request or Publish to npm
        id: changesets
        uses: changesets/action@v1
        with:
          publish: yarn run release

where the release script be defined like this:

    "release": "node ./scripts/release.js && yarn changeset tag"

This way you don't have to rely on steps.changesets.outputs.hasChangeset at all

@Andarist
Copy link
Member

@hirasso it's maintained and I plan to spend more time on it in 2025 but it's an unpaid OSS work and my free time has limits 🤷‍♂️

@hirasso
Copy link

hirasso commented Dec 23, 2024

@Andarist sorry if my comment sounded too pushy! I'm an OSS maintainer myself so I should have known better 😇 ...and amazing to hear that changesets is still maintained! I'll leave my working solution here, I was only able to stitch together all required settings after reading through a few issues, PRs and the source code.

  • I had defined the custom publish action but it was not doing anything (not even throwing a warning):
with:
  publish: pnpm changeset tag
  • My package has "private": true in it's package.json
  • I was missing {"privatePackages": { "version": true, "tag": true }} in my changeset .changeset/config.json and thus my package was being ignored:

https://github.com/changesets/changesets/blob/a3acd12146e888abb104a6a41399be8bba0f6169/packages/should-skip-package/src/index.ts#L18-L20

I think with a little more documentation setups like these would become much more straight forward.

Thank you for changesets, I love it ❤️

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.

6 participants