Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build
# Set the type of machine to run on
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 12.x, 14.x, 15.x ]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
always-auth: true
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
scope: '@awslabs-community-fork'
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run bootstrap
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run build
- run: npm run test

publish:
name: Publish
needs: build
if: github.ref == 'refs/heads/master' && github.event_name == 'push'

# Set the type of machine to run on
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
always-auth: true
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
scope: '@awslabs-community-fork'
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run bootstrap
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run build
- run: git config --global user.name 'ima-bot'
- run: git config --global user.email '[email protected]'
- run: npm run bump-patch
- run: npm whoami
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run publish-ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
yarn.lock
package-lock.json
.idea/

# Created by .ignore support plugin (hsz.mobi)
Expand Down Expand Up @@ -31,4 +30,4 @@ typings/
.yarn-integrity
.env

dist
dist
Loading