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

Fix npm publish workflow #35

Merged
merged 2 commits into from
Jul 17, 2023
Merged

Conversation

gwdawson
Copy link
Member

@gwdawson gwdawson commented Jul 17, 2023

due to an oversight on my behalf, (#34) didn't actually fix the issue.

as you can see from the demo, without the second half of the script, if husky doesn't exist it still throws an error making the workflow fail. however, with the second half, if husky doesn't exist the command just runs echo and doesn't error

github is now throwing errors whilst trying to upload the demo (linked in slack thread):

https://raintank-corp.slack.com/archives/C03PMJLVC67/p1689594553023209?thread_ts=1689588697.351199&cid=C03PMJLVC67

@gwdawson gwdawson requested review from ivanahuckova and a team July 17, 2023 11:49
@gwdawson gwdawson self-assigned this Jul 17, 2023
Copy link
Contributor

@matyax matyax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still is not going to work. I'd recommend that you test it in the console before.

@matyax
Copy link
Contributor

matyax commented Jul 17, 2023

➜  lezer-logql git:(main) test -d node_modules/husky && husky install || echo 'husky not installed... ignoring script'
zsh: command not found: husky
husky not installed... ignoring script

I'll recommend something shortly.

@matyax
Copy link
Contributor

matyax commented Jul 17, 2023

There's another thing that I don't like, which is that we use yarn to build the library, when we don't have a yarn.lock file, we use npm in this repo.

Copy link
Contributor

@matyax matyax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please try the following:

  • Go to publish-npm.yml
  • replace yarn with npm instal --ignore-scripts
  • replace yarn build with npm run build

package.json Outdated Show resolved Hide resolved
@matyax
Copy link
Contributor

matyax commented Jul 17, 2023

Btw, github actions can be tested with https://github.com/nektos/act

@gwdawson gwdawson merged commit c7deebb into main Jul 17, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants