Skip to content

Commit 8f0cc0e

Browse files
authored
Replace semantic-release with changesets (#1213)
* Remove conventional commit system * Set up changesets * Create strange-dolls-grin.md
1 parent 7cfd42c commit 8f0cc0e

File tree

7 files changed

+5767
-4636
lines changed

7 files changed

+5767
-4636
lines changed

.changeset/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with mono-repos or single package repos to help you version and release your code. You can find the full documentation for it [in our repository](https://github.com/changesets/changesets)
4+
5+
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)

.changeset/config.json

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

.changeset/strange-dolls-grin.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"feather-icons": patch
3+
---
4+
5+
Test [changesets](https://github.com/changesets/changesets) release

.github/workflows/ci.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,26 @@ on: push
44

55
jobs:
66
ci:
7+
name: CI
78
runs-on: ubuntu-latest
89
steps:
9-
- uses: actions/checkout@v3
10-
- name: Use Node.js 16.x
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
13+
- name: Setup Node.js 16.x
1114
uses: actions/setup-node@v3
1215
with:
1316
node-version: 16.x
1417
cache: 'npm'
18+
1519
- name: Install dependencies
1620
run: npm ci --legacy-peer-deps
21+
1722
- name: Build
1823
run: npm run build
24+
1925
- name: Test
2026
run: npm run test:coverage
27+
2128
- name: Lint
2229
run: npm run lint
23-
- name: Release
24-
if: github.ref_name == 'main'
25-
run: npx semantic-release
26-
env:
27-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
28-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Node.js 16.x
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 16.x
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci --legacy-peer-deps
26+
27+
- name: Create release pull request or publish to npm
28+
id: changesets
29+
uses: changesets/action@v1
30+
with:
31+
title: 'Release'
32+
publish: npm run release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)