Skip to content

Commit 04449ab

Browse files
authored
chore(ci): add changesets (#1581)
1 parent 75ba9d0 commit 04449ab

7 files changed

Lines changed: 822 additions & 26 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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@1.6.1/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{ "repo": "diegomura/react-pdf" }
6+
],
7+
"commit": false,
8+
"access": "public",
9+
"baseBranch": "master",
10+
"updateInternalDependencies": "patch",
11+
"ignore": []
12+
}

.changeset/selfish-tables-crash.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@react-pdf/renderer': patch
3+
'@react-pdf/font': patch
4+
'@react-pdf/fontkit': patch
5+
'@react-pdf/image': patch
6+
'@react-pdf/layout': patch
7+
'@react-pdf/pdfkit': patch
8+
'@react-pdf/png-js': patch
9+
'@react-pdf/primitives': patch
10+
'@react-pdf/render': patch
11+
'@react-pdf/stylesheet': patch
12+
'@react-pdf/svgkit': patch
13+
'@react-pdf/textkit': patch
14+
'@react-pdf/types': patch
15+
'@react-pdf/unicode-properties': patch
16+
'@react-pdf/yoga': patch
17+
---
18+
19+
added changelog with changesets

.github/workflows/main.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ env:
55
NODE: 14
66

77
on:
8-
push:
9-
branches:
10-
- master
118
pull_request:
129
branches:
1310
- master
@@ -20,7 +17,7 @@ jobs:
2017
- uses: actions/setup-node@v2
2118
with:
2219
node-version: ${{ env.NODE }}
23-
- name: Install dependencies
20+
- name: Install dependencies and build
2421
run: yarn install
2522
- name: Run tests
2623
run: yarn test

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
env:
4+
FORCE_COLOR: 2
5+
NODE: 14
6+
7+
on:
8+
push:
9+
branches:
10+
- master
11+
12+
jobs:
13+
release:
14+
name: Release
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Repo
18+
uses: actions/checkout@v2
19+
with:
20+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
21+
fetch-depth: 0
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v2
25+
with:
26+
node-version: ${{ env.NODE }}
27+
28+
- name: Install dependencies and build
29+
run: yarn install
30+
31+
- name: Run tests
32+
run: yarn test
33+
34+
- name: Create Release Pull Request or Publish to npm
35+
uses: changesets/action@master
36+
with:
37+
# this expects you to have a script called release which does a build for your packages and calls changeset publish
38+
publish: yarn release
39+
version: yarn version-packages
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
"prepublish": "lerna run build --ignore @react-pdf/yoga",
1818
"lint": "eslint packages",
1919
"test": "jest",
20-
"examples": "lerna run start --scope @react-pdf/examples"
20+
"examples": "lerna run start --scope @react-pdf/examples",
21+
"changeset": "changeset",
22+
"version-packages": "changeset version",
23+
"release": "changeset publish"
2124
},
2225
"devDependencies": {
2326
"@babel/cli": "^7.2.3",
@@ -29,6 +32,8 @@
2932
"@babel/plugin-transform-runtime": "^7.2.0",
3033
"@babel/preset-env": "^7.9.6",
3134
"@babel/preset-react": "^7.0.0",
35+
"@changesets/changelog-github": "^0.4.1",
36+
"@changesets/cli": "^2.17.0",
3237
"@rollup/plugin-commonjs": "^18.0.0",
3338
"babel-eslint": "^10.0.1",
3439
"babel-jest": "^24.1.0",

0 commit comments

Comments
 (0)