Skip to content

Commit

Permalink
Merge pull request #61 from matzkoh/github-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matzkoh committed Jan 16, 2023
2 parents af1ce60 + f4ed996 commit 3ec966d
Show file tree
Hide file tree
Showing 9 changed files with 4,634 additions and 32 deletions.
27 changes: 0 additions & 27 deletions .circleci/config.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: setup & test

description: setup & test

runs:
using: composite
steps:
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: 'npm'

- shell: bash
run: npm ci

- shell: bash
run: npm test

- uses: codecov/codecov-action@v3
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: release

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/test
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: test

on:
pull_request:

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/test
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.13.0
5 changes: 5 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": "0.2",
"dictionaries": [],
"words": ["packagejson"]
}
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const { parsers } = requireSafe('prettier/parser-babel') || requireSafe('prettie
const sortPackageJson = require('sort-package-json')
const parser = parsers['json-stringify']

/** @type {import('prettier').Plugin['parsers']} */
exports.parsers = {
'json-stringify': {
...parser,
Expand Down
Loading

0 comments on commit 3ec966d

Please sign in to comment.