Skip to content

Commit

Permalink
chore: improve semantic-release setup (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
andykenward authored May 28, 2020
1 parent d7f4f2f commit a6ab58b
Show file tree
Hide file tree
Showing 5 changed files with 3,580 additions and 80 deletions.
10 changes: 0 additions & 10 deletions .circleci/config.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: release
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['10', '12', '14']
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
- run: yarn test:ci
release:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
- run: yarn build
- run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# graphql-request

[![CircleCI](https://circleci.com/gh/prisma/graphql-request.svg?style=shield)](https://circleci.com/gh/prisma/graphql-request) [![npm version](https://badge.fury.io/js/graphql-request.svg)](https://badge.fury.io/js/graphql-request)

📡 Minimal GraphQL client supporting Node and browsers for scripts or simple apps

![GitHub Action](https://github.com/prisma-labs/graphql-request/workflows/release/badge.svg) [![npm version](https://badge.fury.io/js/graphql-request.svg)](https://badge.fury.io/js/graphql-request)

## Features

- Most **simple and lightweight** GraphQL client
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/prisma/graphql-request.git"
"url": "https://github.com/prisma/graphql-request.git"
},
"keywords": [
"graphql",
Expand All @@ -29,7 +29,7 @@
"url": "https://github.com/prisma/graphql-request/issues"
},
"engines": {
"node": ">=10"
"node": "10.x || 12.x || 13.x || 14.x"
},
"homepage": "https://github.com/prisma/graphql-request",
"scripts": {
Expand All @@ -38,18 +38,20 @@
"build": "rm -rf dist && tsc -d",
"lint": "tslint --project . {examples,src,test}/**/*.ts",
"test": "yarn lint && yarn build && ava --serial",
"test:ci": "yarn test && bundlesize"
"test:ci": "yarn test && bundlesize",
"semantic-release": "semantic-release"
},
"dependencies": {},
"devDependencies": {
"@prisma-labs/prettier-config": "^0.1.0",
"@types/fetch-mock": "5.12.2",
"@types/node": "8.5.5",
"@types/node": "10.17.24",
"ava": "^3.8.2",
"bundlesize": "^0.18.0",
"fetch-cookie": "0.7.2",
"fetch-mock": "5.13.1",
"prettier": "^2.0.5",
"semantic-release": "17.0.8",
"tslint": "5.11.0",
"tslint-config-standard": "8.0.1",
"typescript": "3.0.3"
Expand Down
Loading

0 comments on commit a6ab58b

Please sign in to comment.