Skip to content

Commit

Permalink
Merge pull request #38 from NASA-AMMOS/feature/npm-publish-action
Browse files Browse the repository at this point in the history
Add GH workflows for test and publish-to-npm
  • Loading branch information
dandelany authored Jun 12, 2024
2 parents ae41980 + fb1f238 commit 69241bc
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish-to-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish to NPM

on:
push:
tags:
- v*
workflow_dispatch:

jobs:
publish-to-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: npm ci
- name: Publish
run: npm publish
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test

on:
pull_request:
branches:
- develop
push:
branches:
- develop
tags:
- v*
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: npm
- name: Install Dependencies
run: npm ci
- name: Test
run: npm test
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: Test Results
path: ${{ github.workspace }}/test-report

0 comments on commit 69241bc

Please sign in to comment.