Skip to content

Commit 4abcc22

Browse files
committed
Run prettier in ci
1 parent 7e0b0bc commit 4abcc22

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@ on:
44
branches:
55
- main
66
jobs:
7-
build:
7+
publish:
88
runs-on: ubuntu-latest
99
if: ${{ contains(github.event.head_commit.message, '[publish]') }}
1010
steps:
1111
- uses: actions/checkout@v2
1212
- run: yarn install --frozen-lockfile
13+
- run: yarn prettier-ci
1314
- run: yarn build
1415
- run: yarn test
1516
# Setup .npmrc file to publish to npm
1617
- uses: actions/setup-node@v2
1718
with:
18-
node-version: '16.x'
19-
registry-url: 'https://registry.npmjs.org'
19+
node-version: "16.x"
20+
registry-url: "https://registry.npmjs.org"
2021
- run: npm publish
2122
env:
2223
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
],
1515
"scripts": {
1616
"build": "tsc",
17+
"prettier": "yarn prettier-ci --write",
18+
"prettier-ci": "prettier --check '**/*.{ts,json,md,yml}'",
1719
"test": "node src/tests.js"
1820
},
1921
"prettier": {

0 commit comments

Comments
 (0)