-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (37 loc) · 1.14 KB
/
publish-npm-gpr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build and Release NPM to GPR
on:
release:
types: [published]
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "18.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@v3
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
npm publish --access public mitre-emass_client-*.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}