Skip to content

Commit

Permalink
Extend CI workflows to build NPM package (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
itowlson authored Oct 26, 2020
1 parent d5b91af commit 8abfba1
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
name: Build

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

jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
os: [ubuntu-latest, windows-latest]
node-version: [10.x, 12.x]

steps:
- uses: actions/checkout@v2
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Package

on:
push:
tags:
- "v*"

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node-version: [10.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run compile
- run: npm pack
- name: Save package artifact
uses: actions/upload-artifact@v2
with:
name: generator-wasm-oci
path: generator-wasm-oci-*.tgz
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
coverage
generators/**/*
*.tgz

0 comments on commit 8abfba1

Please sign in to comment.