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 support to make yarn usable in setup field #3

Closed
smorimoto opened this issue May 16, 2020 · 6 comments
Closed

Add support to make yarn usable in setup field #3

smorimoto opened this issue May 16, 2020 · 6 comments

Comments

@smorimoto
Copy link

smorimoto commented May 16, 2020

/usr/bin/yarn --frozen-lockfile && yarn build
yarn run v1.22.4
error Command "&&" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
##[error]The process '/usr/bin/yarn' failed with exit code 1
✖  fatal     Error: The process '/usr/bin/yarn' failed with exit code 1 
    at ExecState._setResult (/home/runner/work/_actions/JasonEtco/build-and-tag-action/v1/dist/index.js:16755:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/JasonEtco/build-and-tag-action/v1/dist/index.js:16738:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/JasonEtco/build-and-tag-action/v1/dist/index.js:16632:27)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
@JasonEtco
Copy link
Owner

Can you share your whole workflow file? This isn’t a problem with yarn.

@smorimoto
Copy link
Author

smorimoto commented May 17, 2020

This doesn't work.

name: Main workflow

on:
  release:
    types:
      - edited
      - published

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Use Node.js 14.x
        uses: actions/setup-node@v1
        with:
          node-version: 14.x

      - name: Publish action
        uses: JasonEtco/build-and-tag-action@v1
        with:
          setup: "yarn --frozen-lockfile && yarn build"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

@JasonEtco
Copy link
Owner

That’s not your whole workflow file. Please share the entire file or I can’t help you.

@smorimoto
Copy link
Author

The problem is probably due to Node.js specific unique behavior due to the lack of yarn subcommands, so I don't think the entire workflow is necessary. Anyway, I updated that.

@JasonEtco
Copy link
Owner

There's currently a problem with @actions/exec and multiple commands (using &&), see #4 and actions/toolkit#461. Still, this sounds like something different - but also not something that this action is doing wrong. I'm going to close this because there's nothing we can do here.

@smorimoto
Copy link
Author

Indeed.

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

2 participants