Skip to content

Commit

Permalink
Move graphql-toolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Dec 24, 2019
1 parent b5ac83b commit c57203f
Show file tree
Hide file tree
Showing 81 changed files with 2,884 additions and 14,211 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@

name: CI

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Master
uses: actions/checkout@master
uses: actions/checkout@v1
- name: Use Node
uses: actions/setup-node@v1
uses: actions/setup-node@master
with:
node-version: '12.x'
node-version: '13.x'
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies using Yarn
run: yarn install
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Test
run: yarn test
- name: Publish Canary
env: # Or as an environment variable
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
run: |
if [ "${{github.repository}}" == "ardatan/graphql-import" ] && [ "${{ secrets.NODE_AUTH_TOKEN }}" != "" ]
then
echo "//registry.npmjs.org/:_authToken=${{ secrets.NODE_AUTH_TOKEN }}" > .npmrc
npm run ci:release:canary
else
echo "Fork PR: ${{github.repository}}"
echo "Skipping canary publish due to a fork/PR..."
fi
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Graphcool
Copyright (c) 2019 The Guild

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# graphql-import

[![CircleCI](https://circleci.com/gh/prisma/graphql-import.svg?style=shield)](https://circleci.com/gh/prisma/graphql-import) [![npm version](https://badge.fury.io/js/graphql-import.svg)](https://badge.fury.io/js/graphql-import)
[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)

Import & export definitions in GraphQL SDL (also refered to as GraphQL modules)
Expand Down
10 changes: 10 additions & 0 deletions bump.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const semver = require('semver');
const packageJson = require('./package.json');
const fs = require('fs');
const cp = require('child_process');

const gitHash = cp.spawnSync('git', ['rev-parse', '--short', 'HEAD']).stdout.toString().trim();
const alphaVersion = semver.inc(packageJson.version, 'prerelease', true, gitHash);
packageJson.version = alphaVersion;

fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 2));
7 changes: 0 additions & 7 deletions fixtures/circular/a.graphql

This file was deleted.

9 changes: 0 additions & 9 deletions fixtures/circular/b.graphql

This file was deleted.

17 changes: 0 additions & 17 deletions fixtures/circular/c.graphql

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/collision/a.graphql

This file was deleted.

5 changes: 0 additions & 5 deletions fixtures/collision/b.graphql

This file was deleted.

Loading

0 comments on commit c57203f

Please sign in to comment.