Skip to content

publishedPackages doesn't contain packages if not published to npm #532

Description

@mikeybinns

Changesets can be used to version non-npm packages as noted by the documentation here:
https://github.com/changesets/changesets/blob/main/docs/versioning-apps.md

When running the action, the action successfully creates tags for my non-npm packages, however when looking at the outputs.publishedPackages part, it doesn't include the packages where the version has been bumped. What this means is I can't have a second step which relies on the release to perform a second action (e.g. publish to a non-npm source like packagist).

There doesn't seem to be anything in the docs which suggests that these are missing on purpose, so I think it's a bug. If it's not a bug and this is indeed the intended outcome, then the docs of the versioning apps section should be updated to note this behaviour. I can confirm published outputs "true" as expected, but publishedPackages just outputs an empty string.

Here's a limited example to showcase what my workflow looks like.

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    outputs:
      published: ${{ steps.changesets.outputs.published }}
      publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
    steps:
      - name: Create release pull request or create tag for other jobs
        id: changesets
        uses: changesets/action@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          publish: changeset tag
  second-job:
    name: Do thing based on changesets publish only if particular package is released
    needs: release
    if: ${{ needs.release.outputs.published == 'true' && contains(needs.release.outputs.publishedPackages.*.name, '@company/package') }}
  third-job:
    name: Do different thing based on changesets publish only if a different package is released
    needs: release
    if: ${{ needs.release.outputs.published == 'true' && contains(needs.release.outputs.publishedPackages.*.name, '@company/package_2') }}

Activity

  1. KTrain5169 commented on Dec 22, 2025

    @KTrain5169

    +1 on this, this would help with versioned deployments as well (for e.x. deploy a new version on push if a changeset PR was merged which bumps the version of the app)

  2. Dan-Shields commented on Mar 17, 2026

    @Dan-Shields

    I can't reproduce this with "@changesets/cli": "^2.30.0". I have the following step in my version & publish workflow:

    - name: Create Release Pull Request or Publish Tags
      id: changesets
      uses: changesets/action@v1
      with:
        version: bun changeset version
        publish: bun changeset tag
        createGithubReleases: false
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    Sample changeset tag output in the workflow:

    $ changeset tag
    🦋  New tag:  @myorg/pkg-a@6.1.1
    🦋  New tag:  @myorg/pkg-b@7.2.0
    

    publishedPackages then looks like:

    [
      {
        name: "@myorg/pkg-a",
        version: "6.1.1",
      }, {
        name: "@myorg/pkg-b",
        version: "7.2.0",
      }
    ]
    

    And my subsequent steps work fine

  3. mikeybinns commented on Mar 17, 2026

    @mikeybinns
    Author

    This sounds promising, I will test again when I can.

    Can I just confirm for your example that @myorg/pkg-a and @myorg/pkg-b are NOT being published to npm? It doesn't appear so from your code, just being certain.

  4. Dan-Shields commented on Mar 17, 2026

    @Dan-Shields

    That's right, I have a subsequent job that does publishing to a custom npm registry. This step only adds tags to the local repo, and I push the tags manually after with git push origin 'refs/tags/*'

  5. mikeybinns commented on Mar 25, 2026

    @mikeybinns
    Author

    Appears it still isn't working for me with Changesets CLI ^2.30, but I noticed a bug in my workflow in the debug output so will have to wait for another test opportunity before I can show outputs correctly.

  6. mikeybinns commented on Mar 25, 2026

    @mikeybinns
    Author

    Okay, got another chance and now I'm even more confused, this is my output:
    Image

    And the associated section in the yml:
    Image

    Seems like potentially a broken format on output? I'm expecting this (as per the action docs):

    Image

    My second/third jobs still not firing with this conditional:

    Image
  7. bluwy commented on Jun 25, 2026

    @bluwy
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions