Skip to content

chore: update preview release workflow to use snapshots #5365

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 12 commits into from
May 7, 2025

Conversation

rubencarvalho
Copy link
Contributor

@rubencarvalho rubencarvalho commented Apr 10, 2025

Description

This PR updates the beta release workflow to use the snapshot approach for generating unique versions.

We had previously planned to have incremental suffixes for the beta releases (e.g.: 1.5.0-beta.0, 1.5.0-beta.1, etc.). But this was not working because in CI we do not persist the latest published version, so we would always try to publish beta.0. In this PR, we now use a snapshot approach that adds unique timestamps instead (e.g. 1.5.0-beta.20250411081626) ensuring there are no conflicts! :)

Motivation and context

The beta release workflow was previously not working correctly after the initial run due to version conflicts (you can see an example run).

Screenshot 2025-04-10 at 21 58 06

The CI environment does not maintain state between runs (it does not know which beta version was last published), so it would always try to publish the same beta version (e.g., 1.5.0-beta.0):

The workflow now uses yarn changeset version --snapshot beta which together with a new changeset config, uses the calculated version and format the version to our desired version output. And by appending a unique timestamp-based suffix, we ensure each CI build creates a distinct version number that won't create conflicts.

How has this been tested?

  • Test locally
    1. Pull this PR
    2. run yarn changeset version --snapshot beta
    3. expect to see the new version format in the package.json of any of the components (e.g. "version": "1.5.0-beta.20250411081626")

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

Copy link

changeset-bot bot commented Apr 10, 2025

⚠️ No Changeset found

Latest commit: d98f995

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

Copy link

Branch preview

Review the following VRT differences

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Copy link

Tachometer results

Currently, no packages are changed by this PR...

@rubencarvalho rubencarvalho marked this pull request as ready for review April 11, 2025 08:31
@rubencarvalho rubencarvalho requested a review from a team as a code owner April 11, 2025 08:31
Copy link
Contributor

@Rajdeepc Rajdeepc left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for bringing this in!

Copy link
Contributor

@blunteshwar blunteshwar left a comment

Choose a reason for hiding this comment

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

I have made some changes to the beta release process so that we can leverage the current functionality and the version number will also look like this 1.5.0-beta.0 1.5.0-beta.1, 1.5.0-beta.2, and so on..
#5366

@blunteshwar blunteshwar self-requested a review April 11, 2025 17:43
@castastrophe castastrophe force-pushed the ruben/beta-snapshot-releases branch from 475ec04 to e5ef447 Compare May 6, 2025 14:26
Copy link
Collaborator

@castastrophe castastrophe left a comment

Choose a reason for hiding this comment

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

I think this looks really great! We can always iterate on the approach later.

@@ -11,7 +11,7 @@ jobs:
name: Build & publish site
runs-on: ubuntu-latest
# Run the job if manually triggered or if the commit message includes '#publish' & the check suite has passed or if the commit message includes 'docs' and the check suite has passed
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '#publish') || contains(github.event.head_commit.message, 'docs')
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '#publish') || contains(github.event.head_commit.message, 'docs:') || contains(github.event.head_commit.message, 'docs(')
Copy link
Contributor

Choose a reason for hiding this comment

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

more explicit to avoid a commit message that has the word docs in the message. this ensures it is of the commit type docs

@caseyisonit caseyisonit changed the title chore: update beta release workflow to use snapshots chore: update preview release workflow to use snapshots May 7, 2025
@caseyisonit caseyisonit enabled auto-merge (squash) May 7, 2025 18:25
@caseyisonit caseyisonit merged commit 2d9fabe into main May 7, 2025
24 checks passed
@caseyisonit caseyisonit deleted the ruben/beta-snapshot-releases branch May 7, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants