Skip to content

Commit 7087418

Browse files
committed
refactor: use changesets instead of semantic-releases
1 parent 7d499eb commit 7087418

File tree

8 files changed

+670
-119
lines changed

8 files changed

+670
-119
lines changed

.changeset/README.md

+8
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

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "ineka/engine" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/slow-icons-laugh.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ineka/engine": patch
3+
---
4+
5+
Updated project tooling

.github/workflows/release.yml

+40-41
Original file line numberDiff line numberDiff line change
@@ -3,69 +3,68 @@ on:
33
push:
44
branches:
55
- main
6-
- next
7-
- beta
8-
- alpha
96
jobs:
10-
build-and-test:
7+
build:
118
name: Build and test project before release
129
runs-on: ubuntu-latest
1310
steps:
14-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
12+
13+
- name: Install pnpm
14+
uses: pnpm/action-setup@v4
15+
with:
16+
version: 9
17+
1518
- name: Use Node.js LTS
16-
uses: actions/setup-node@v2
19+
uses: actions/setup-node@v4
1720
with:
1821
node-version: lts/*
19-
- name: Cache node modules
20-
uses: actions/cache@v2
21-
env:
22-
cache-name: cache-node-modules
23-
with:
24-
path: ~/.npm
25-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
26-
restore-keys: |
27-
${{ runner.os }}-build-${{ env.cache-name }}-
28-
${{ runner.os }}-build-
29-
${{ runner.os }}-
22+
cache: pnpm
23+
3024
- name: Install dependencies
31-
run: npm ci --prefer-offline
32-
- name: Build project
33-
run: npm run build
34-
- name: Lint project code
35-
run: npm run lint
36-
- uses: actions/upload-artifact@v2
25+
run: pnpm install
26+
27+
- name: Build sources
28+
run: pnpm build
29+
30+
- uses: actions/upload-artifact@v4
3731
with:
3832
name: build
3933
path: dist
4034

4135
release:
4236
name: Release
4337
runs-on: ubuntu-latest
44-
needs: [build-and-test]
38+
needs: [build]
39+
with:
40+
fetch-depth: 0
4541
steps:
46-
- uses: actions/checkout@v2
42+
- uses: actions/checkout@v4
43+
44+
- name: Install pnpm
45+
uses: pnpm/action-setup@v4
46+
with:
47+
version: 9
48+
4749
- name: Use Node.js LTS
48-
uses: actions/setup-node@v2
50+
uses: actions/setup-node@v4
4951
with:
5052
node-version: lts/*
51-
- name: Cache node modules
52-
uses: actions/cache@v2
53-
env:
54-
cache-name: cache-node-modules
55-
with:
56-
path: ~/.npm
57-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
58-
restore-keys: |
59-
${{ runner.os }}-build-${{ env.cache-name }}-
60-
${{ runner.os }}-build-
61-
${{ runner.os }}-
53+
cache: pnpm
54+
6255
- name: Install dependencies
63-
run: npm ci --prefer-offline
64-
- uses: actions/download-artifact@v2
56+
run: pnpm install
57+
58+
- uses: actions/download-artifact@v4
6559
with:
6660
name: build
6761
path: dist
68-
- env:
62+
63+
- name: Create Release Pull Request or Publish to npm
64+
uses: changesets/action@v1
65+
with:
66+
publish: pnpm release
67+
version: pnpm version
68+
env:
6969
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7070
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
71-
run: npx semantic-release

.releaserc

-66
This file was deleted.

README.md

+1-11
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
<br>
99
<br>
1010
<a href="https://www.npmjs.com/package/@ineka/engine"><img alt="npm" src="https://img.shields.io/npm/v/@ineka/engine?style=for-the-badge"></a>
11-
<a href="https://www.npmjs.com/package/@ineka/engine"><img alt="npm (tag)" src="https://img.shields.io/npm/v/@ineka/engine/next?style=for-the-badge"></a>
12-
<a href="https://github.com/ineka-dev/engine/actions/workflows/release.yml"><img alt="GitHub Workflow Status Release" src="https://img.shields.io/github/actions/workflow/status/ineka-dev/engine/release.yml?logo=github&style=for-the-badge"></a>
11+
<a href="https://github.com/ineka-dev/engine/actions/workflows/release.yml"><img alt="GitHub Workflow Status Release" src="https://img.shields.io/github/actions/workflow/status/ineka-dev/engine/release.yml?logo=github&style=for-the-badge"></a>
1312
<a href="https://github.com/ineka-dev/engine/actions/workflows/docs.yml"><img alt="GitHub Workflow Status Documentation" src="https://img.shields.io/github/actions/workflow/status/ineka-dev/engine/docs.yml?label=docs&logo=github&style=for-the-badge"></a>
1413
<a href="https://github.com/ineka-dev/engine/blob/main/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/ineka-dev/engine?color=black&style=for-the-badge"></a>
1514
<a href="https://github.com/ineka-dev/engine/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues-raw/ineka-dev/engine?style=for-the-badge">
@@ -57,15 +56,6 @@ This concept aims to **reduce bloat** and offer **a large panel of customization
5756

5857
[**Find more about available packages here**](https://github.com/ineka-dev/packages)
5958

60-
## CI/CD Workflows
61-
62-
This project uses GitHub Actions for CI/CD jobs.
63-
64-
We have workflows to:
65-
- Build and test the project on each pull request.
66-
- Build, test and release the project.
67-
- Generate a documentation and deploy it.
68-
6959
## Contributing
7060
Any help and contribution is welcome, feel free to submit issues and/or contribute to the project.
7161

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@
2121
"docs": "typedoc ./src",
2222
"lint": "eslint . --flag unstable_ts_config",
2323
"lint:fix": "eslint . --fix --flag unstable_ts_config",
24-
"semantic-release": "semantic-release"
24+
"release": "changeset publish",
25+
"version": "changeset version"
2526
},
2627
"dependencies": {
2728
"nanoid": "^5.0.7"
2829
},
2930
"devDependencies": {
3031
"@antfu/eslint-config": "^2.27.0",
32+
"@changesets/cli": "^2.27.7",
3133
"@rollup/plugin-typescript": "^11.1.6",
3234
"@types/node": "^22.4.2",
3335
"esbuild": "^0.23.1",

0 commit comments

Comments
 (0)