Skip to content
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

ci: add snapshot release workflow #3071

Merged
merged 2 commits into from
Sep 5, 2024
Merged

Conversation

pfulton
Copy link
Collaborator

@pfulton pfulton commented Sep 4, 2024

Inspired by @GarthDB and Spectrum Tokens, this adds an on-demand snapshot release workflow.

Any user with write access can trigger the workflow to run against a branch and a snapshot release will be published from that branch based upon the changeset(s) added to the branch's commit history.

For example:

  1. I make some changes to the project, and push up my changes to a branch.
  2. I add a changeset to signify that my changes should incur some version increase.
  3. I navigate to the Actions tab in the GitHub interface, and click on Release Snapshot from the list of available workflows in the left navigation.
  4. Once there, I click on Run Workflow in the upper right part of the interface, which shows a popover.
  5. In the popover, I choose the branch from which I wish to release the snapshot ("Use workflow from"), and in the text field, I type in a meaningful tag name (example: s2-action-button)—or, optionally, I leave this field blank and the workflow attempts to automatically create a tag name based on the branch's name.
  6. The workflow runs, using changeset version to version the affected components with the proper snapshot version name and tags, and it also automatically publishes to npm with the snapshot version number and tags.

Description

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • VRTs have been run and looked at.
  • Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

Screenshots

Screenshot 2024-09-04 at 4 06 00 PM

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • ✨ This pull request is ready to merge. ✨

Copy link

changeset-bot bot commented Sep 4, 2024

⚠️ No Changeset found

Latest commit: 143ca23

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
Contributor

github-actions bot commented Sep 4, 2024

🚀 Deployed on https://pr-3071--spectrum-css.netlify.app

Copy link
Contributor

github-actions bot commented Sep 4, 2024

File metrics

Summary

Total size: 4.10 MB*

🎉 No changes detected in any packages

* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@castastrophe
Copy link
Collaborator

I love this! Thanks for adding it. Would you add the instructions you wrote up for the description to the release instructions in the Storybook guides? 🎉

@pfulton pfulton force-pushed the pfulton/gh-actions-snapshot-release branch 2 times, most recently from 03c56cf to e2bc731 Compare September 5, 2024 19:07
Inspired by @GarthDB and Spectrum Tokens, this adds an on-demand
snapshot release workflow. Any user with write access can trigger the
workflow to run against a branch and a snapshot release will be published
from there based upon the changeset(s) added to the branch's
commit history.
@pfulton pfulton force-pushed the pfulton/gh-actions-snapshot-release branch from e2bc731 to 143ca23 Compare September 5, 2024 19:22
@pfulton pfulton merged commit 56b945a into main Sep 5, 2024
12 checks passed
@pfulton pfulton deleted the pfulton/gh-actions-snapshot-release branch September 5, 2024 19:29
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