Skip to content

Commit c0fdf4e

Browse files
philsturgeonPhil Sturgeon
andauthored
chore: github action (#6)
* chore: github action * security: bumped dependencies * security: bumped dependencies Co-authored-by: Phil Sturgeon <[email protected]>
1 parent 7df213c commit c0fdf4e

File tree

6 files changed

+5984
-113
lines changed

6 files changed

+5984
-113
lines changed

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release npm package
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@master
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: "12.x"
17+
- run: npm ci
18+
- run: npm run build --if-present
19+
- run: npm test
20+
- run: npx semantic-release
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/npm-test.yml renamed to .github/workflows/test.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
name: Node CI
1+
name: Tests
22

3-
on: [push]
3+
on: push
44

55
jobs:
6-
build:
7-
6+
test:
87
runs-on: ubuntu-latest
9-
108
strategy:
119
matrix:
1210
node-version: [8.x, 10.x, 12.x]
13-
1411
steps:
1512
- uses: actions/checkout@v1
1613
- name: Use Node.js ${{ matrix.node-version }}

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ A little NodeJS package to convert OpenAPI Schema Object or Parameter Object to
44

55
Currently converts from [OpenAPI 3.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md) to [JSON Schema Draft 4](http://json-schema.org/specification-links.html#draft-4).
66

7+
[![Treeware](https://img.shields.io/badge/dynamic/json?color=brightgreen&label=Treeware&query=%24.total&url=https%3A%2F%2Fpublic.offset.earth%2Fusers%2Ftreeware%2Ftrees)](https://treeware.earth)
8+
79
## Why?
810

911
OpenAPI is a specification for describing RESTful APIs. OpenAPI v3.0 allows us to describe the structures of request and response payloads in a detailed manner. This would, theoretically, mean that we should be able to automatically validate request and response payloads. However, as of writing there aren't many validators around.
@@ -188,6 +190,10 @@ would be converted to:
188190
}
189191
```
190192

193+
## Treeware
194+
195+
This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/{venfor}/{package}) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
196+
191197
## Thanks
192198

193199
- [Stoplight][] for donating time and effort to this project, and many more.

0 commit comments

Comments
 (0)