这是indexloc提供的服务,不要输入任何密码
Skip to content

Script for releasing from CI. #1562

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 8 commits into from
Aug 24, 2022
Merged

Conversation

nathanhammond
Copy link
Contributor

This PR depends on #1455. After landing we would get this fun release button:
Release Button

It currently, intentionally, has a commented out load of the turbobot npm token so that it's assured harmless until reviewed.

@vercel
Copy link

vercel bot commented Jul 21, 2022

@nathanhammond is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@nathanhammond nathanhammond force-pushed the ci-releaser branch 3 times, most recently from 880f72e to 2848551 Compare July 21, 2022 06:58

- name: Release
run: cd cli && make publish
# env:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably going to need this 😄 (if you're commenting for testing we could also just leave the secret unset so we don't have to double merge?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left that this way so that it was guaranteed to be safe until we're ready; will definitely be adjusted prior to landing.

run: pnpm install --filter=turbo-monorepo

- name: Version
run: ./scripts/version.js ${{ inputs.increment }} ${{ inputs.identifier }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@tknickman tknickman added the pr: fixship A PR which is approved with notes and does not require re-review. label Aug 1, 2022
@vercel
Copy link

vercel bot commented Aug 24, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
turbo-site ✅ Ready (Inspect) Visit Preview Aug 24, 2022 at 2:00PM (UTC)

@nathanhammond
Copy link
Contributor Author

I have no reason to believe that this won't work, you can see two test runs:

The actual publishing is the one thing I can't test until doing it live. npm publish --dry-run doesn't actually run through all of the checks which trolled me hard last month when I moved us to GoReleaser in the first place.

Given that publishing is working locally on our build boxes I am very confident that it will work.

@nathanhammond nathanhammond marked this pull request as ready for review August 24, 2022 11:35
working-directory: cli

# Optional: golangci-lint command line arguments.
args: --issues-exit-code=0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we running this if we're continuing on errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using this to make sure that the installation of golangci-lint matches our normal CI setup. golangci-lint's action does not have an install-only option like GoReleaser, so I'm turning the auto-triggered run into a no-op. During make publish that also triggers linting and we do not ignore the outcome (lint failure prevents release).

@@ -115,7 +117,7 @@ publish: clean prepublish build
cd $(CLI_DIR)/../packages/create-turbo && npm publish --tag $(TURBO_TAG)
cd $(CLI_DIR)/../packages/turbo-codemod && npm publish --tag $(TURBO_TAG)

git push origin main "v$(TURBO_VERSION)"
git push -f origin main "v$(TURBO_VERSION)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also do you need to push up the tag?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. --force is necessary as main is a protected branch—that's also why there is a TURBOBOT token involved here. I explicitly elected against --force-with-lease because if we're running a release it's extremely important for the actual commit that the release is based on (hash) to be on main. In other words: if this clobbers something else then we fix the something else, not the release.
  2. By specifying the "v$(TURBO_VERSION)" the tag comes along for the ride.

@nathanhammond
Copy link
Contributor Author

Thanks for your comments, I've gone back and added commentary into the files to make sure that the information is not lost.

kodiakhq bot pushed a commit that referenced this pull request Aug 25, 2022
Pass at clarifying documentation based upon questions in #1562.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fixship A PR which is approved with notes and does not require re-review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants