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

check-dist.yml GitHub workflow does not work properly #171

Closed
Marcono1234 opened this issue Jan 31, 2024 · 2 comments
Closed

check-dist.yml GitHub workflow does not work properly #171

Marcono1234 opened this issue Jan 31, 2024 · 2 comments

Comments

@Marcono1234
Copy link
Contributor

Marcono1234 commented Jan 31, 2024

The check-dist.yml workflow of this repository does not seem to work properly. If I understand it correctly, it is supposed to detect whether /dist/index.js has been properly updated.

However, the workflow only runs npm run build, which does not update the /dist directory. I think it should run npm run pack instead.

Or alternatively if it is not desired that users commit the /dist/index.js in their pull requests, maybe there should be one workflow which fails in case users commit this file. And another workflow which runs on main and automatically updates /dist/index.js?

@bigdaz
Copy link
Member

bigdaz commented Jan 31, 2024

Good catch!
I presume this was originally copied from the gradle-build-action repository, where npm run build does indeed build the dist directory.
I've pushed a fix so this is consistent between projects I work on.

Yes, ideally we'd have a workflow that generates the dist directory on any push to main, and prohibits direct changes to dist in a PR. But for now that's a manual process, with a (broken until now) check.

@bigdaz
Copy link
Member

bigdaz commented Jan 31, 2024

First attempt failed. Testing in #172

@bigdaz bigdaz closed this as completed in 2572bdd Jan 31, 2024
bigdaz added a commit that referenced this issue Feb 1, 2024
- Updated package.json to be more consistent with `gradle/actions` repo
- Updated 'check-dist' workflow to be more consistent with `gradle/actions` repo
- Check-dist now actually checks! Fixes #171
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