Skip to content

Publish failing with error not able to read changesets output #694

Description

@jamiebuilds-signal

Getting this error on the latest versions of @changesets/cli and the changesets/action when the publish action runs when there are no changesets and all packages are published:

Error: Error: Failed to read changesets output at /home/runner/work/_temp/changesets-output-<uuid>.ndjson

It looks like this error was added in #678 and it expects the publish command to write to CHANGESETS_OUTPUT=<path> but maybe that file does not get written to when there is nothing to publish.

Of note our setup is maybe a bit unique, we have packages/ that get versioned and published via Changesets in the same repo as our app which goes through it's own release system. So most of the commits in the repo do not have an associated changeset to them and it currently causes the action to fail on every commit to main

Versions

Full Output

$ changeset publish
🦋  info npm info @signalapp/types
🦋  warn @signalapp/types is not being published because version 0.1.1 is already published on npm
🦋  warn No unpublished projects to publish
Error: Error: Failed to read changesets output at /home/runner/work/_temp/changesets-output-3cb84d4d-1ddb-4c08-87b3-8a26475c76cd.ndjson
Error: Failed to read changesets output at /home/runner/work/_temp/changesets-output-3cb84d4d-1ddb-4c08-87b3-8a26475c76cd.ndjson

Relevant Code

// package.json
{
  "scripts": {
    "changeset:version": "changeset version && pnpm install --lockfile-only",
    "changeset:publish": "changeset publish"
  },
  "devDependencies": {
    "@changesets/cli": "2.31.0",
  }
}
// .changeset/config.json
{
  "changelog": [
    "@changesets/cli/changelog",
    {
      "repo": "signalapp/Signal-Desktop",
      "disableThanks": true
    }
  ],
  "commit": false,
  "fixed": [],
  "linked": [],
  "access": "public",
  "baseBranch": "main",
  "updateInternalDependencies": "patch",
  "ignore": [],
  "bumpVersionsWithWorkspaceProtocolOnly": false,
  "changedFilePatterns": ["**"],
  "format": "auto",
  "privatePackages": { "version": false, "tag": false }
}
# .github/workflows/publish-package.yml
name: Publish Packages
on:
  push:
    branches:
      - main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
  publish:
    if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' }}
    name: Publish
    runs-on: ubuntu-latest
    timeout-minutes: 45

    permissions:
      id-token: write # Required for OIDC
      contents: write
      pull-requests: write

    steps:
      - uses: actions/checkout@v7.0.0
        with:
          persist-credentials: false
          fetch-depth: 0
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4.2.0
        with:
          node-version: '24.17.0'
          registry-url: 'https://registry.npmjs.org/'
          package-manager-cache: false
      - run: pnpm install --frozen-lockfile

      - id: changesets
        uses: changesets/action@c47fa68bd43bb8ae0bae7e558622593deebf5955
        with:
          commit-message: Publish Packages
          pr-title: Publish Packages
          version-script: pnpm changeset:version
          publish-script: pnpm changeset:publish
          create-github-releases: false
          push-git-tags: true
          commit-mode: github-api
          github-token: ${{ secrets.AUTOMATED_GITHUB_PAT }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions