-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
2,884 additions
and
14,211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.