Skip to content

Commit

Permalink
Merge pull request #7 from modyo/develop
Browse files Browse the repository at this point in the history
append changes from develop
  • Loading branch information
Giorgiosaud authored Mar 24, 2020
2 parents 59b1721 + 7066571 commit ce045f3
Show file tree
Hide file tree
Showing 20 changed files with 1,234 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
parser: 'babel-eslint',
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-console': [process.env.NODE_ENV === 'production' ? 'error' : 'off', { allow: ['warn', 'error'] }],
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
overrides: [
Expand Down
29 changes: 29 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
branches: [master]
name-template: 'v$NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
template: |
## Changes
$CHANGES
categories:
- title: '🚀 Features'
labels:
- 'feat'
- 'enhancement'
- 'refactor'
- 'test'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- 'docs'
- 'build'
- 'fix'
- title: '🧰 Maintenance'
labels:
- 'chore'
- 'ci'
- 'style'
- 'perf'
39 changes: 39 additions & 0 deletions .github/workflows/lintJs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Pull Request Lint Javascript

on:
pull_request:
types:
[
opened,
edited,
reopened,
synchronize,
ready_for_review,
review_requested,
review_request_removed,
]
jobs:
pull-request-lint-javascript:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
registry-url: 'https://npm.pkg.github.com'
scope: '@modyo'
- name: Get yarn cache directory path
id: yarn-cache-set-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-set-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
if: steps.yarn-cache-set-path.outputs.cache-hit != 'true'
run: yarn install
- name: Lint Package
run: yarn lint
39 changes: 39 additions & 0 deletions .github/workflows/lintStyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Pull Request Lint Style

on:
pull_request:
types:
[
opened,
edited,
reopened,
synchronize,
ready_for_review,
review_requested,
review_request_removed,
]
jobs:
pull-request-lint-style:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
registry-url: 'https://npm.pkg.github.com'
scope: '@modyo'
- name: Get yarn cache directory path
id: yarn-cache-set-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-set-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
if: steps.yarn-cache-set-path.outputs.cache-hit != 'true'
run: yarn install
- name: Lint Package
run: yarn lint:style
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publlish Repo

on:
release:
types: [published]
jobs:
publish-library:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://npm.pkg.github.com/
scope: '@modyo'
- name: Install dependencies with yarn
run: yarn
env:
NODE_AUTH_TOKEN: ${{ secrets.TOKEN_REG }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This gets generated automatically
- name: Build Library
run: yarn build:lib
- name: Versioning
run : |
echo $GITHUB_REF
TAG=$(echo $GITHUB_REF | cut -c 11-)
echo $TAG
git config user.email "operations@modyo.com"
git config user.name "Modyo"
yarn version --new-version $TAG
- name: Publish to GitHub Package Registry
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{github.token}}
17 changes: 17 additions & 0 deletions .github/workflows/release-draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release Draft
on:
push:
branches:
- master
jobs:
release-draft:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Release Draft
uses: release-drafter/release-drafter@v5
with:
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
config-name: release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/testUnitJs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Pull Request Unit Test

on:
pull_request:
types:
[
opened,
edited,
reopened,
synchronize,
ready_for_review,
review_requested,
review_request_removed,
]
jobs:
pull-request-test-javascript:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
registry-url: 'https://npm.pkg.github.com'
scope: '@modyo'
- name: Get yarn cache directory path
id: yarn-cache-set-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-set-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
if: steps.yarn-cache-set-path.outputs.cache-hit != 'true'
run: yarn install
- name: Lint Package
run: yarn test:unit
Loading

0 comments on commit ce045f3

Please sign in to comment.