Skip to content

Commit b068851

Browse files
author
Andrey Okonetchnikov
committed
Add changeset/action
1 parent 9f83f45 commit b068851

File tree

6 files changed

+592
-22
lines changed

6 files changed

+592
-22
lines changed

.changeset/README.md

Lines changed: 5 additions & 0 deletions
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 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)
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/master/docs/common-questions.md)

.changeset/config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@1.0.3/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"linked": [],
6+
"access": "public",
7+
"baseBranch": "master"
8+
}

.changeset/loud-dots-study.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@component-driven/mixins': major
3+
'@component-driven/react-focus-within': major
4+
'@component-driven/with-selector': major
5+
---
6+
7+
Switch to a monorepo setup and use [Changesets](https://github.com/atlassian/changesets).
8+
9+
Each package is a separate npm package.

.github/workflows/release.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,35 @@
11
name: Release
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- master
47

58
jobs:
69
release:
710
name: Release
811
runs-on: ubuntu-latest
912
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v1
12-
- name: Setup Node.js
13-
uses: actions/setup-node@v1
13+
- name: Checkout Repo
14+
uses: actions/checkout@master
1415
with:
15-
node-version: 12
16-
- name: Install dependencies
17-
run: npm ci
18-
- name: Release
19-
uses: codfish/semantic-release-action@v1
16+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
17+
fetch-depth: 0
18+
19+
- name: Setup Node.js 12.x
20+
uses: actions/setup-node@master
21+
with:
22+
node-version: 12.x
23+
24+
- name: Install Dependencies
25+
run: yarn
26+
27+
- name: Create Release Pull Request or Publish to npm
28+
id: changesets
29+
uses: changesets/action@master
30+
with:
31+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
32+
publish: yarn release
2033
env:
2134
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2235
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"scripts": {
1313
"postinstall": "preconstruct dev",
1414
"build": "preconstruct build",
15+
"prerelease": "npm run build",
16+
"release": "changeset publish",
1517
"start": "styleguidist server",
1618
"styleguide": "styleguidist server",
1719
"styleguide:build": "styleguidist build",
@@ -25,6 +27,7 @@
2527
},
2628
"homepage": "https://react-focus-utils.netlify.com",
2729
"dependencies": {
30+
"@changesets/cli": "^2.6.5",
2831
"react": "^16.13.0",
2932
"react-dom": "^16.13.0",
3033
"styled-components": "^5.0.1"

0 commit comments

Comments
 (0)