diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 60561d8d054a7..eea818304620d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -91,14 +91,7 @@ If you're using a different package manager replace npm accordingly. ## Publishing `turbo` to the npm registry -All builds are handled by manually triggering the appropriate [`release` GitHub workflow](./.github/workflows/release.yml). - -To manually run a release: - -1. `brew install goreleaser` -2. Add `GORELEASER_KEY` env var with the GoReleaser Pro key (ask @turbo-oss to get access to the key) -3. Update `version.txt` (do not commit this change to git manually) -4. `cd cli && make publish` +See [the publishing guide](./release.md#release-turborepo). ## Contributing to Turbopack diff --git a/cli/Makefile b/cli/Makefile index 5f6a0a56df82b..68c1641b3488a 100644 --- a/cli/Makefile +++ b/cli/Makefile @@ -136,7 +136,6 @@ build-go-turbo-cross: build-lib-turbo-cross: goreleaser release --rm-dist -f cross-lib.yml - .PHONY: stage-release stage-release: cmd/turbo/version.go echo "Version: $(TURBO_VERSION)" @@ -162,52 +161,6 @@ stage-release: cmd/turbo/version.go git tag "v$(TURBO_VERSION)" git push origin staging-$(TURBO_VERSION) --tags --force -.PHONY: publish -publish: clean build - echo "Version: $(TURBO_VERSION)" - echo "Tag: $(TURBO_TAG)" - - # Include the patch in the log. - git format-patch HEAD~1 --stdout | cat - - npm config set --location=project "//registry.npmjs.org/:_authToken" $(NPM_TOKEN) - - # Publishes the native npm modules. - goreleaser release --rm-dist -f combined-release.yml - - # Split packing from the publish step so that pnpm locates the correct .npmrc file. - cd $(CLI_DIR)/../packages/turbo && pnpm pack --pack-destination=$(CLI_DIR)/../ - cd $(CLI_DIR)/../packages/turbo-ignore && pnpm pack --pack-destination=$(CLI_DIR)/../ - cd $(CLI_DIR)/../packages/create-turbo && pnpm pack --pack-destination=$(CLI_DIR)/../ - cd $(CLI_DIR)/../packages/turbo-codemod && pnpm pack --pack-destination=$(CLI_DIR)/../ - - # Publish the remaining JS packages in order to avoid race conditions. - cd $(CLI_DIR)/../ - npm publish -ddd --tag $(TURBO_TAG) $(CLI_DIR)/../turbo-$(TURBO_VERSION).tgz - # npm publish -ddd --tag $(TURBO_TAG) $(CLI_DIR)/../turbo-ignore-$(TURBO_VERSION).tgz - npm publish -ddd --tag $(TURBO_TAG) $(CLI_DIR)/../create-turbo-$(TURBO_VERSION).tgz - npm publish -ddd --tag $(TURBO_TAG) $(CLI_DIR)/../turbo-codemod-$(TURBO_VERSION).tgz - -.PHONY: snapshot-turbo -snapshot-turbo: - echo "Version: $(TURBO_VERSION)" - echo "Tag: $(TURBO_TAG)" - - # Include the patch in the log. - git format-patch HEAD~1 --stdout | cat - - npm config set --location=project "//registry.npmjs.org/:_authToken" $(NPM_TOKEN) - - # Publishes the native npm modules. - goreleaser release --rm-dist -f combined-shim.yml --snapshot - - # Split packing from the publish step so that npm locates the correct .npmrc file. - cd $(CLI_DIR)/../packages/turbo && pnpm pack --pack-destination=$(CLI_DIR)/dist/ - cd $(CLI_DIR)/../packages/turbo-ignore && pnpm pack --pack-destination=$(CLI_DIR)/dist/ - cd $(CLI_DIR)/../packages/create-turbo && pnpm pack --pack-destination=$(CLI_DIR)/dist/ - cd $(CLI_DIR)/../packages/turbo-codemod && pnpm pack --pack-destination=$(CLI_DIR)/dist/ - - .PHONY: publish-turbo publish-turbo: clean build echo "Version: $(TURBO_VERSION)" @@ -225,12 +178,14 @@ publish-turbo: clean build cd $(CLI_DIR)/../packages/turbo && pnpm pack --pack-destination=$(CLI_DIR)/../ cd $(CLI_DIR)/../packages/create-turbo && pnpm pack --pack-destination=$(CLI_DIR)/../ cd $(CLI_DIR)/../packages/turbo-codemod && pnpm pack --pack-destination=$(CLI_DIR)/../ + cd $(CLI_DIR)/../packages/turbo-ignore && pnpm pack --pack-destination=$(CLI_DIR)/../ # Publish the remaining JS packages in order to avoid race conditions. cd $(CLI_DIR)/../ npm publish -ddd --tag $(TURBO_TAG) $(CLI_DIR)/../turbo-$(TURBO_VERSION).tgz npm publish -ddd --tag $(TURBO_TAG) $(CLI_DIR)/../create-turbo-$(TURBO_VERSION).tgz npm publish -ddd --tag $(TURBO_TAG) $(CLI_DIR)/../turbo-codemod-$(TURBO_VERSION).tgz + npm publish -ddd --tag $(TURBO_TAG) $(CLI_DIR)/../turbo-ignore-$(TURBO_VERSION).tgz demo/lage: install node $(CLI_DIR)/scripts/generate.mjs lage diff --git a/cli/package.json b/cli/package.json index 097f7509ab24a..413b641e34585 100644 --- a/cli/package.json +++ b/cli/package.json @@ -8,7 +8,6 @@ "test": "make test-go", "e2e": "make e2e", "e2e-prebuilt": "make e2e-prebuilt", - "publish": "make publish-all", "format": "make fmt-go", "lint": "make lint-go", "integration-tests": "make integration-tests" diff --git a/packages/turbo-ignore/README.md b/packages/turbo-ignore/README.md index 9dda10a950190..866c0e7f20270 100644 --- a/packages/turbo-ignore/README.md +++ b/packages/turbo-ignore/README.md @@ -94,12 +94,6 @@ When deploying on [Vercel](https://vercel.com), `turbo-ignore` can make a more a **NOTE:** By default on Vercel, `turbo-ignore` will always deploy the first commit of a new branch. This behavior can be changed by providing the `ref` to compare against to the `--fallback` flag. See the [Examples](#Examples) section for more details. -## Releasing - -```sh -pnpm release -``` - --- For more information about Turborepo, visit [turbo.build](https://turbo.build) and follow us on Twitter ([@turborepo](https://twitter.com/turborepo))! diff --git a/packages/turbo-ignore/package.json b/packages/turbo-ignore/package.json index d280a83912b2d..8f1e9ad5af594 100644 --- a/packages/turbo-ignore/package.json +++ b/packages/turbo-ignore/package.json @@ -14,17 +14,18 @@ "bugs": { "url": "https://github.com/vercel/turbo/issues" }, - "main": "index.js", - "bin": "index.js", + "files": [ + "dist" + ], + "main": "dist/index.js", + "bin": "dist/index.js", "scripts": { - "build": "tsup && cp ./package.json ./dist/package.json && cp README.md ./dist/README.md", - "release": "pnpm build && cd dist && pnpm publish", + "build": "tsup", "test": "jest", "lint": "eslint src/**/*.ts", "check-types": "tsc --noEmit" }, "devDependencies": { - "@manypkg/find-root": "^1.1.0", "@types/jest": "^27.4.0", "@types/node": "^16.11.12", "eslint": "^8.20.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 22b4448c77be1..02fad8d375167 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -419,7 +419,6 @@ importers: packages/turbo-ignore: specifiers: - '@manypkg/find-root': ^1.1.0 '@types/jest': ^27.4.0 '@types/node': ^16.11.12 eslint: ^8.20.0 @@ -431,7 +430,6 @@ importers: turbo-utils: workspace:* typescript: ^4.7.4 devDependencies: - '@manypkg/find-root': 1.1.0 '@types/jest': 27.5.2 '@types/node': 16.11.44 eslint: 8.23.0