Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@4.0.0/schema.json",
"changelog": ["@changesets/changelog-github", {"repo": "github/remote-input-element"}],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
2 changes: 2 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ jobs:
run: npm run build
- name: Run test
run: npm run test
- name: Run release script tests
run: npm run test:release-script
27 changes: 0 additions & 27 deletions .github/workflows/publish.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release

on:
push:
branches:
- main
workflow_dispatch: {}

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Full history and tags are required so the release-preparation
# script can compare against the previous release tag.
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

- name: Prepare release (synthetic changeset for unreleased changes)
run: npm run prepare-release

- name: Create release pull request or publish
uses: changesets/action@v2
with:
title: 'Release: version packages'
commit: 'chore: version packages'
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ npm install
npm test
```

## Releasing

This project uses [Changesets](https://github.com/changesets/changesets) to manage versioning, changelogs, and publishing to npm.

- **Explicit changesets**: When you make a user-facing change, run `npx changeset` and follow the prompts to describe the change and pick a bump type (`patch`, `minor`, or `major`). Commit the generated file in `.changeset/`. Explicit changesets always take precedence over the automatic behavior described below.
- **Automatic patch releases**: Many merges (for example, Dependabot dependency bumps) don't come with a changeset. The [`release` workflow](.github/workflows/release.yml) runs `scripts/prepare-release.mjs` before invoking `changesets/action`. If no explicit changeset exists, but there are commits merged since the last published release tag, it generates a single synthetic `patch` changeset summarizing those commits (linking pull request numbers when available) so a release PR still gets opened.
- **Release pull request**: On every push to `main` (or a manual run via `workflow_dispatch`), the workflow opens or updates a "Release: version packages" pull request with the version bump and changelog entry. Merging that pull request triggers the same workflow again, which publishes the new version to npm (with [provenance](https://docs.npmjs.com/generating-provenance-statements)) and to GitHub Packages, and creates the matching git tag.
- **Manual runs**: Use the "Run workflow" button on the `Release` workflow in the Actions tab (`workflow_dispatch`) at any time to regenerate or refresh the release pull request without waiting for a push to `main`.

## License

Distributed under the MIT license. See LICENSE for details.
Loading
Loading