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

Store LICENSE files when publishing from GH actions #12810

Merged
merged 2 commits into from Feb 17, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -100,6 +100,9 @@ jobs:
with:
name: build-artifact

- name: Generate LICENSE files
run: make clone-license
Copy link
Member

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?

Copy link
Member Author

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:

path: |
codemods/*/lib/**/*
eslint/*/lib/**/*
packages/*/lib/**/*
packages/babel-standalone/*.js

Copy link
Contributor

@JLHwung JLHwung Feb 17, 2021

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.

Copy link
Member Author

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.


- name: Publish to npm
run: yarn release-tool publish --yes
env:
Expand Down