Skip to content

Commit

Permalink
Merge pull request #124 from groupon/aaarichter-actions
Browse files Browse the repository at this point in the history
ci(actions): add actions workflow
  • Loading branch information
aaarichter authored Jun 4, 2021
2 parents 19ae11c + b371d5e commit 832575c
Show file tree
Hide file tree
Showing 5 changed files with 1,059 additions and 1,016 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/nlm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: NLM

on:
pull_request:

jobs:
tag:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # necessary to get full commit history
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- run: npm ci
- run: npx nlm verify
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
25 changes: 25 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.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:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
35 changes: 35 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Publish to NPM

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 14
- run: npm ci
- run: npx nlm release
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
Loading

0 comments on commit 832575c

Please sign in to comment.