Skip to content

Snapshot release using GitHub actions

Garth Braithwaite edited this page Aug 21, 2024 · 1 revision

These are some instructions on how to publish a snapshot release from a branch using Changeset and our Release Snapshot GitHub action.

1. Add a Changeset

A Changeset file is needed in the branch to determine which package(s) will be released.

You can use the command line locally on your machine to create the Changeset file:

$ pnpm changeset

This will step you through a wizard to determine the type of change and which package(s) to release.

You can also add the markdown file manually if you prefer. See the instructions in the Changeset documentation.

2. Trigger snapshot release action

You can manually trigger the snapshot release action on the Snapshot Release GitHub Action page.

Click the "Run workflow" button/dropdown.

image

In the dropdown form, select the branch you want to use in your snapshot release and add a tag that will be used in the npm release.

image

Click the run workflow button.

3. Double-check the release

If the GitHub action ran successfully, your snapshot should be released to npm. Double-check by going to the "Versions" tab on the page for your npm package on npmjs.org (i.e., npmjs.com/package/).

You should see your newly released snapshot with a version name that looks like 0.0.0-<npm tag>-<datetime stamp> e.g., [0.0.0-schema-20240821152525](https://www.npmjs.com/package/@adobe/spectrum-component-api-schemas/v/0.0.0-schema-20240821152525).

image