Skip to content

Commit 6036a8e

Browse files
lobsterkatieAbhiPrasad
authored andcommitted
chore(dev): Remove redundant prepublishOnly build step in CI (#5083)
Based both on the description in the comment above it and the restrictions on when it is supposed to run, it appears that the `prepublishOnly` step of the `Build` job is meant to do the same thing as the `pack` step of the `Upload Artifacts` job. "Meant" is the operative word, however, because in reality, it doesn't actually do anything - though it calls the repo-level `prepublishOnly` script, which calls the `prepublishOnly` script in every package that has one... no package has one, so it's a no-op. This removes the step and the associated repo-level yarn script, since they seem to have been replaced by the `build:npm` script called in `Upload Artifacts`.
1 parent 7907ec8 commit 6036a8e

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,6 @@ jobs:
9292
# this file) to a constant and skip rebuilding all of the packages each time CI runs.
9393
if: steps.cache_built_packages.outputs.cache-hit == ''
9494
run: yarn build
95-
# We are performing a `prepublishOnly` step manually because build workflow is not responsible for publishing
96-
# the actual release. It only creates artifacts which then are uploaded and used by another workflow.
97-
# Because of that, any `prepublishOnly` script is skipped and files it produces are not included in the tarball.
98-
# We also cannot use `prepare` script which would be more suited, because it's run only before `pack` is called,
99-
# and it's done from a `release` workflow and not here.
100-
- name: Run prepublishOnly script
101-
if: startsWith(github.ref, 'refs/heads/release/')
102-
run: yarn prepublishOnly
10395
outputs:
10496
# this needs to be passed on, because the `needs` context only looks at direct ancestors (so steps which depend on
10597
# `job_build` can't see `job_install_deps` and what it returned)

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"link:yarn": "lerna run --stream --concurrency 1 link:yarn",
1919
"lint": "lerna run --parallel lint",
2020
"lint:eslint": "lerna run --parallel lint:eslint",
21-
"prepublishOnly": "lerna run --stream --concurrency 1 prepublishOnly",
2221
"postpublish": "make publish-docs && lerna run --stream --concurrency 1 postpublish",
2322
"test": "lerna run --ignore @sentry-internal/browser-integration-tests --ignore @sentry-internal/node-integration-tests --stream --concurrency 1 --sort test",
2423
"test-ci": "ts-node ./scripts/test.ts"

0 commit comments

Comments
 (0)