-
Notifications
You must be signed in to change notification settings - Fork 63
58 lines (50 loc) · 1.71 KB
/
push-to-npm.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Push Heimdall-Lite to NPM and GitHub Packages and Push InspecJs to NPM
on:
release:
types: [published]
env:
NODE_ENV: production
jobs:
build-deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: "22"
check-latest: true
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- name: Install project dependencies
run: yarn install --frozen-lockfile --production
- name: Pack all items that are published as packages
run: yarn pack:all
- name: Publish Heimdall Lite to NPM
if: always()
run: npm publish --access public apps/frontend/mitre-heimdall-lite*.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish InSpecJS to NPM
if: always()
run: npm publish --access public libs/inspecjs/inspecjs*.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish OHDF Converters to NPM
if: always()
run: npm publish --access public libs/hdf-converters/mitre-hdf-converters*.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v4
if: always()
with:
node-version: "22"
check-latest: true
registry-url: 'https://npm.pkg.github.com'
cache: 'yarn'
- name: Publish Heimdall Lite to GitHub Packages
if: always()
run: npm publish --access public apps/frontend/mitre-heimdall-lite*.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}