Skip to content

Commit 67bad1c

Browse files
authored
Merge pull request #24 from sectsect/feature/changesets
chore(release): migrate from release-it to changesets
2 parents 40c9e55 + 13d2378 commit 67bad1c

9 files changed

Lines changed: 994 additions & 2168 deletions

File tree

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{ "repo": "sectsect/webpack-sweet-entry" }
6+
],
7+
"commit": false,
8+
"fixed": [],
9+
"linked": [],
10+
"access": "public",
11+
"baseBranch": "master",
12+
"updateInternalDependencies": "patch",
13+
"ignore": []
14+
}

.changeset/many-olives-tie.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@sect/webpack-sweet-entry': patch
3+
---
4+
5+
.
6+
7+
- chore(release): migrate from release-it to changesets

.github/workflows/release.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
packages: write
14+
id-token: write
15+
16+
jobs:
17+
release:
18+
name: Release
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout Repo
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js 24.x
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 24.x
28+
registry-url: 'https://registry.npmjs.org'
29+
30+
- name: Install Dependencies
31+
run: npm install
32+
33+
- name: Build Packages
34+
run: npm run build
35+
36+
- name: Type Check
37+
run: npm run type-check
38+
39+
- name: Lint
40+
run: npm run lint
41+
42+
- name: Run Tests
43+
run: npm run test
44+
45+
- name: Run Test Coverage
46+
run: npm run test:coverage
47+
48+
- name: Upload coverage reports to Codecov
49+
uses: codecov/codecov-action@v5
50+
env:
51+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
52+
with:
53+
files: ./coverage/lcov.info
54+
55+
- name: Create Release Pull Request or Publish to npm
56+
id: changesets
57+
uses: changesets/action@v1
58+
with:
59+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
60+
publish: npm run release
61+
commit: 'chore: release package(s)'
62+
title: 'chore: release package(s)'
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
engine-strict=true
2+
provenance=true

README.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# @sect/webpack-sweet-entry
2-
[![Test](https://github.com/sectsect/webpack-sweet-entry/actions/workflows/test.yml/badge.svg)](https://github.com/sectsect/webpack-sweet-entry/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/sectsect/webpack-sweet-entry/branch/master/graph/badge.svg?token=0EKNBV7VK1)](https://codecov.io/gh/sectsect/webpack-sweet-entry) [![CodeQL](https://github.com/sectsect/webpack-sweet-entry/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/sectsect/webpack-sweet-entry/actions/workflows/github-code-scanning/codeql)
2+
[![Release](https://github.com/sectsect/webpack-sweet-entry/actions/workflows/release.yml/badge.svg)](https://github.com/sectsect/webpack-sweet-entry/actions/workflows/release.yml) [![codecov](https://codecov.io/gh/sectsect/webpack-sweet-entry/branch/master/graph/badge.svg?token=0EKNBV7VK1)](https://codecov.io/gh/sectsect/webpack-sweet-entry) [![CodeQL](https://github.com/sectsect/webpack-sweet-entry/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/sectsect/webpack-sweet-entry/actions/workflows/github-code-scanning/codeql)
33

44
Multiple entry points with glob pattern / Ignore files and directories with leading underscore `_` / Preserve directory structure
55

@@ -222,7 +222,50 @@ $ npm install --save-dev @sect/webpack-sweet-entry
222222
+ const { WebpackSweetEntry } = require('@sect/webpack-sweet-entry');
223223
```
224224
225-
## Changelog
225+
## Development
226+
227+
### Making Changes
228+
229+
When you make a change that should be included in the next release:
230+
231+
1. Create a feature branch
232+
2. Make your changes
233+
3. Add a changeset: `npm run changeset`
234+
- Select the type of change (patch/minor/major)
235+
- Provide a description of the change
236+
4. Commit the changeset file along with your changes
237+
5. Create a pull request
238+
239+
### Release Process
240+
241+
This project uses [changesets](https://github.com/changesets/changesets) for version management and releases.
242+
243+
**Automated Release Workflow:**
244+
1. When a PR with changesets is merged to master, a "Version Packages" PR is automatically created
245+
2. The Version Packages PR includes:
246+
- Updated version numbers in package.json
247+
- Updated CHANGELOG.md
248+
- Removed changeset files
249+
3. When the Version Packages PR is merged:
250+
- The package is automatically built
251+
- Published to npm with provenance
252+
- A GitHub release is created
253+
254+
**Manual Testing:**
255+
```bash
256+
# Create a test changeset
257+
npm run changeset
258+
259+
# Preview version bump (without publishing)
260+
npm run version-packages
261+
262+
# Build and test before release
263+
npm run build
264+
npm test
265+
npm run lint
266+
```
267+
268+
## Changelog
226269
227270
See [CHANGELOG](https://github.com/sectsect/webpack-sweet-entry/blob/master/CHANGELOG.md) file.
228271

0 commit comments

Comments
 (0)