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
Store LICENSE files when publishing from GH actions #12810
Conversation
nicolo-ribaudo
commented
Feb 16, 2021
Q | A |
---|---|
Fixed Issues? | Fixes #12807 |
Patch: Bug Fix? | |
Major: Breaking Change? | |
Minor: New Feature? | |
Tests Added + Pass? | Yes |
Documentation PR Link | |
Any Dependency Changes? | |
License | MIT |
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/40709/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 47e6e1d:
|
.github/workflows/release.yml
Outdated
@@ -100,6 +100,9 @@ jobs: | |||
with: | |||
name: build-artifact | |||
|
|||
- name: Generate LICENSE files | |||
run: make clone-license |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it wasn't being added in make prepublish? or removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem was that we are running make prepublish
in a different job, and to reduce CI times we only store these files:
babel/.github/workflows/release.yml
Lines 45 to 49 in 8e9143f
path: | | |
codemods/*/lib/**/* | |
eslint/*/lib/**/* | |
packages/*/lib/**/* | |
packages/babel-standalone/*.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add the cloned license to build artifacts then. It won't affect development build since they are not generated.
Or we can merge the build job to the release job instead. The artifacts are meant to speed up CI in node matrix scenarios.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I split the jobs is because the "Publish release on npm" job has access to our npm token, so I wanted to run as few things as possible in it.
Currently it's only running yarn release-tool publish --yes
, which means that it only runs code bundled ahead of time in this repository.
I prefer to add LICENSE
files to the artifact.
I can release a patch tomorrow. It needs to be done locally because we need need to force-publish all the packages that we published without a license. |