Skip to content

Commit

Permalink
chore(ci): add changesets (#1581)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeetiss committed Dec 18, 2021
1 parent 75ba9d0 commit 04449ab
Show file tree
Hide file tree
Showing 7 changed files with 822 additions and 26 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

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)

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)
12 changes: 12 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.6.1/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "diegomura/react-pdf" }
],
"commit": false,
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
19 changes: 19 additions & 0 deletions .changeset/selfish-tables-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'@react-pdf/renderer': patch
'@react-pdf/font': patch
'@react-pdf/fontkit': patch
'@react-pdf/image': patch
'@react-pdf/layout': patch
'@react-pdf/pdfkit': patch
'@react-pdf/png-js': patch
'@react-pdf/primitives': patch
'@react-pdf/render': patch
'@react-pdf/stylesheet': patch
'@react-pdf/svgkit': patch
'@react-pdf/textkit': patch
'@react-pdf/types': patch
'@react-pdf/unicode-properties': patch
'@react-pdf/yoga': patch
---

added changelog with changesets
5 changes: 1 addition & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ env:
NODE: 14

on:
push:
branches:
- master
pull_request:
branches:
- master
Expand All @@ -20,7 +17,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE }}
- name: Install dependencies
- name: Install dependencies and build
run: yarn install
- name: Run tests
run: yarn test
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

env:
FORCE_COLOR: 2
NODE: 14

on:
push:
branches:
- master

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE }}

- name: Install dependencies and build
run: yarn install

- name: Run tests
run: yarn test

- name: Create Release Pull Request or Publish to npm
uses: changesets/action@master
with:
# this expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
version: yarn version-packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"prepublish": "lerna run build --ignore @react-pdf/yoga",
"lint": "eslint packages",
"test": "jest",
"examples": "lerna run start --scope @react-pdf/examples"
"examples": "lerna run start --scope @react-pdf/examples",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "changeset publish"
},
"devDependencies": {
"@babel/cli": "^7.2.3",
Expand All @@ -29,6 +32,8 @@
"@babel/plugin-transform-runtime": "^7.2.0",
"@babel/preset-env": "^7.9.6",
"@babel/preset-react": "^7.0.0",
"@changesets/changelog-github": "^0.4.1",
"@changesets/cli": "^2.17.0",
"@rollup/plugin-commonjs": "^18.0.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.1.0",
Expand Down

0 comments on commit 04449ab

Please sign in to comment.