Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
georgedias authored Sep 22, 2022
1 parent 9199cb0 commit 03efef2
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish-npm-gpr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and Release NPM to GPR
on:
release:
types: [published]

jobs:
build-deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "16.x"
registry-url: https://npm.pkg.github.com/
scope: '@mitre'

- name: Build the NPM Package
run: |
cd src/typescript_client
npm install
npm run build
- name: Pack all items that are published
run: |
cd src/typescript_client
npm pack
# Setup .npmrc file to publish to GitHub Package Registry
- uses: actions/setup-node@v1
with:
registry-url: 'https://npm.pkg.github.com'
scope: '@mitre'

# Publish emass_client to GitHub Package Registry
- name: Publish emass_client to GPR
run: |
cd src/typescript_client
npm publish mitre-emass_client-*.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 03efef2

Please sign in to comment.