Merge branch 'master' of github.com:mikqi/backstage into ci/deploy-storybook

This commit is contained in:
Muhammad Rivki
2020-03-30 13:19:17 +07:00
53 changed files with 398 additions and 98 deletions
+3 -2
View File
@@ -17,10 +17,11 @@ jobs:
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: find location of yarn cache
- name: find location of global yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
- name: cache global yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+11 -11
View File
@@ -17,14 +17,18 @@ jobs:
matrix:
node-version: [12.x]
env:
CI: true
steps:
- uses: actions/checkout@v2
- name: fetch branch master
run: git fetch origin master
- name: find location of yarn cache
- name: find location of global yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
- name: cache global yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -39,14 +43,10 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: yarn install, build, and test
run: |
yarn install
yarn lint
yarn build
yarn test
env:
CI: true
- run: yarn install
- run: yarn lint
- run: yarn build
- run: yarn test
deploy-storybook:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
@@ -57,7 +57,7 @@ jobs:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: build storybook'
- name: build storybook
run: |
yarn install
yarn workspace storybook build-storybook
+54
View File
@@ -0,0 +1,54 @@
name: Master Build
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
env:
CI: true
steps:
- uses: actions/checkout@v2
- name: find location of global yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: cache global yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
- run: yarn install
- run: yarn lint
- run: yarn build
- run: yarn test
# Publishes current version of packages that are not already present in the registry
- name: publish
run: npx --no-install lerna publish from-package --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Tags the commit with the version in the core package if the tag doesn't exist
- uses: Klemensas/action-autotag@1.2.3
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
package_root: "packages/core"
tag_prefix: "v"