Skip to content

ci: Run prepublishOnly script during release #3576

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

Merged
merged 2 commits into from
May 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ jobs:
# this file) to a constant and skip rebuilding all of the packages each time CI runs.
if: steps.cache_built_packages.outputs.cache-hit == ''
run: yarn build
# We are performing a `prepublishOnly` step manually because build workflow is not responsible for publishing
# the actual release. It only creates artifacts which then are uploaded and used by another workflow.
# Because of that, any `prepublishOnly` script is skipped and files it produces are not included in the tarball.
# We also cannot use `prepare` script which would be more suited, because it's run only before `pack` is called,
# and it's done from a `release` workflow and not here.
- name: Run prepublishOnly script
if: startsWith(github.ref, 'refs/heads/release/')
run: yarn prepublishOnly
outputs:
# this needs to be passed on, because the `needs` context only looks at direct ancestors (so steps which depend on
# `job_build` can't see `job_install_deps` and what it returned)
Expand Down