Skip to content

Commit

Permalink
chore: use changesets for version management (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jun 29, 2022
1 parent 551dd0e commit 34cc896
Show file tree
Hide file tree
Showing 7 changed files with 1,425 additions and 30 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
@@ -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)
15 changes: 15 additions & 0 deletions .changeset/config.json
@@ -0,0 +1,15 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "prettier/eslint-plugin-prettier"
}
],
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Expand Up @@ -2,7 +2,8 @@ name: CI

on:
push:
branches: [master]
branches:
- master
pull_request:

jobs:
Expand All @@ -11,8 +12,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
eslint-version: [7, 8]
node-version: [12, 14, 16]
eslint-version:
- 7
- 8
node-version:
- 12
- 14
- 16

steps:
- uses: actions/checkout@v3
Expand All @@ -26,7 +32,7 @@ jobs:
run: yarn upgrade eslint@${{ matrix.eslint-version }}

- name: Install
run: yarn install
run: yarn --frozen-lockfile

- name: Test
run: yarn run test
run: yarn test
26 changes: 26 additions & 0 deletions .github/workflows/pkg-size.yml
@@ -0,0 +1,26 @@
name: Package Size Report

on:
pull_request:
branches:
- master

jobs:
pkg-size-report:
name: Package Size Report
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn --frozen-lockfile

- name: Package Size Report
uses: pkg-size/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,29 @@
name: Release

on:
push:
branches:
- master

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn

- name: Install Dependencies
run: yarn --frozen-lockfile

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 9 additions & 4 deletions package.json
Expand Up @@ -9,15 +9,19 @@
"prettier"
],
"author": "Teddy Katz",
"contributors": [
"JounQin (https://github.com/JounQin) <admin@1stg.me>"
],
"files": [
"eslint-plugin-prettier.js"
],
"main": "eslint-plugin-prettier.js",
"scripts": {
"lint": "eslint .",
"test": "npm run lint && mocha",
"format": "yarn run prettier '**/*.{js,json,md,yml}' --write && yarn run lint --fix",
"generate-release": "node-release-script"
"test": "yarn lint && mocha",
"format": "yarn prettier '**/*.{js,json,md,yml}' --write && yarn lint --fix",
"release": "changeset release",
"prerelease": "yarn format && yarn test"
},
"repository": {
"type": "git",
Expand All @@ -35,8 +39,9 @@
"prettier": ">=2.0.0"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.5",
"@changesets/cli": "^2.23.0",
"@graphql-eslint/eslint-plugin": "^2.5.0",
"@not-an-aardvark/node-release-script": "^0.1.0",
"@typescript-eslint/parser": "^5.29.0",
"eslint": "^8.18.0",
"eslint-config-not-an-aardvark": "^2.1.0",
Expand Down

0 comments on commit 34cc896

Please sign in to comment.