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

problem with outputs object #319

Open
ah7255703 opened this issue Aug 20, 2023 · 3 comments
Open

problem with outputs object #319

ah7255703 opened this issue Aug 20, 2023 · 3 comments

Comments

@ah7255703
Copy link

i am trying to upload the build directory (dist) as artifact
NOTE: it is only one package.

      - name: Upload embed as artifact.
        uses: actions/upload-artifact@v3
        if: ${{ steps.changesets.outputs.published }}
        with:
          name: my-package@${{steps.changesets.outputs.publishedPackages[0].version}}
          path: search-widget/dist

the result is my-package@

@sangdth
Copy link

sangdth commented Sep 6, 2023

I also have this issue. I have tried with:

  • id: changesets: same issue with or without id in the step
  • tried the name with quotes " ... ${{ ... }} "
  • tried the name without quotes ... ${{ ... }}

the issue is still there

@emzarts
Copy link

emzarts commented Oct 16, 2023

You have to run changesets publish instead of your own publish script in order for the output to be set

@lukasIO
Copy link

lukasIO commented Mar 19, 2024

I'm running into the same issue even though my release script calls npm build-package && changeset publish.
I get outputs.published as 'true' but the outputs.publishedPackages stays empty

edit:

The problem is that outputs.publishedPackages is a plain string.
It works as expected when wrapping the string in a GH action function that converts it to JSON:
fromJson(outputs.publishedPackages)

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

No branches or pull requests

4 participants