JasonEtco / build-and-tag-action

📦🔖 A GitHub Action for publishing JavaScript Actions
MIT License
93 stars 38 forks source link

Action claims that the dist/index.js file doesn't exist? #4

Closed lee-dohm closed 4 years ago

lee-dohm commented 4 years ago

When I run npm ci && npm run build locally on the latest code in my repo, the dist/index.js file is created. So I'm not sure why I'm getting this error?

Thoughts?

JasonEtco commented 4 years ago

Hm, thanks for opening, and for trying it out @lee-dohm. Everything looks correct to me 🤔 I'm guessing that the setup script wasn't run, otherwise we'd see the log output. It should have run though; I added some more logs in cba59090bd17019871df1fd9fc5771c340a4d9d4 so we should at least see what it's doing with the setup script. Are you able to try again?

JasonEtco commented 4 years ago

Saw that you re-ran it @lee-dohm, thanks 🙏 So:

image

It looks like @actions/exec doesn't map super well for commands with &&. I didn't catch it in this repo, because I have to build it in the workflow instead of in the action itself (so I set setup: '', can't use it if it ain't built yet). I'm not sure how to solve this 😞 Might be worth removing the setup script entirely, rather than have something that only works sometimes.

lee-dohm commented 4 years ago

Hmmm ... let me try changing to using run steps instead of relying on the setup script and see if that works 🤔

lee-dohm commented 4 years ago

Yep, that worked 👍 Want me to leave this open for you to track the problem?

JasonEtco commented 4 years ago

Yes please, thanks @lee-dohm!! I'm going to first see if there's a "right way" to do multiple commands, might need a change to @actions/exec. If that doesn't pan out, I'll remove the setup script entirely.

lee-dohm commented 4 years ago

Thank you for building this so I don't have to 😆