Skip to content

ci: try aggregate git release - #2754

Merged
emmenko merged 2 commits into
mainfrom
nm-changesets-release-aggregate
Aug 11, 2022
Merged

ci: try aggregate git release#2754
emmenko merged 2 commits into
mainfrom
nm-changesets-release-aggregate

Conversation

@emmenko

@emmenko emmenko commented Aug 10, 2022

Copy link
Copy Markdown
Member

There is an upcoming feature in the changesets/action related to aggregating github releases: changesets/action#193

You can check one of the last comments to see some real world examples.

I think we can give it a try in our next release. For us it should work fine because we're already using fixed versions, so there is one single version for all packages.
The result is having GitHub releases per version as opposed to one GitHub release for each package (as it is now).

@changeset-bot

changeset-bot Bot commented Aug 10, 2022

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 163ade5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment thread .changeset/config.json
Comment on lines +12 to +16
"@commercetools-applications/*",
"@commercetools-backend/*",
"@commercetools-frontend/*",
"!@commercetools-frontend/codemod"
"@commercetools-local/*",
"@commercetools-website/*"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is to keep ALL packages linked together, even the private apps (templates, playground, etc). The result is that these packages will get bumped to the same version as the others (even though they won't be released to NPM).

Comment thread .changeset/config.json
"@commercetools-applications/*",
"@commercetools-backend/*",
"@commercetools-frontend/*",
"!@commercetools-frontend/codemod"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I thought about this again and I think it's better to keep it in sync with the other versions. It would be easier also to document new codemods for specific releases.

Comment on lines +59 to +64
- name: Storing release version for changeset
id: release_version
run: echo "::set-output name=value::$(./scripts/print_release_version.sh)"
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We need to "extract" the "next" release version before the changesets/action step, as the value is used for the githubReleaseName and githubTagName config values.

Comment on lines +74 to +76
createGithubReleases: aggregate
githubReleaseName: v${{ steps.release_version.outputs.value }}
githubTagName: v${{ steps.release_version.outputs.value }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the new additional config

Comment thread .github/workflows/release.yml Outdated
id: changesets
uses: changesets/action@v1.3.0
# uses: changesets/action@v1.3.0
uses: dotansimha/changesets-action@1bd10e16a393db098c8f537c719621962c0d5571

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Using this version, as it hasn't been officially released yet. This is a way also to help testing this feature and give feedback.

@github-actions

github-actions Bot commented Aug 10, 2022

Copy link
Copy Markdown
Contributor

Deploy preview for merchant-center-application-kit ready!

✅ Preview
https://merchant-center-application-68tfsldaw-commercetools.vercel.app
https://appkit-sha-03d1c0d3a1afa6d975b7e11a44e214af75e9a1b2.commercetools.vercel.app
https://appkit-pr-2754.commercetools.vercel.app

Built with commit 163ade5.
This pull request is being automatically deployed with vercel-action

@emmenko
emmenko requested a review from a team August 11, 2022 09:27
Comment thread .changeset/config.json
Comment on lines +15 to +16
"@commercetools-local/*",
"@commercetools-website/*"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry but I don't the inclusion of this packages here. Will this make them visible in the release changesets?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

They all already have changesets, as they are part of the monorepo workspaces. E.g. https://github.com/commercetools/merchant-center-application-kit/blob/main/website/CHANGELOG.md

This change is just to align the bumped versions as I mentioned here: #2754 (comment)
Nothing else changes from the current status quo.

@CarlosCortizasCT CarlosCortizasCT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks very promising 👍

@tdeekens tdeekens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is really nice. Actually been one of my biggest struggles with vhangesets: navigating non aggregated releases in large mono-repos. Thanks for keeping an eye on recent work!

@emmenko
emmenko force-pushed the nm-changesets-release-aggregate branch from 347bb9a to 163ade5 Compare August 11, 2022 15:11
@emmenko
emmenko merged commit 5ae8b80 into main Aug 11, 2022
@emmenko
emmenko deleted the nm-changesets-release-aggregate branch August 11, 2022 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants