-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Emily Rodriguez <[email protected]> Signed-off-by: Emily Rodriguez <[email protected]> Co-authored-by: Emily Rodriguez <[email protected]>
- Loading branch information
Showing
3 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build and Release NPM to GPR (GitHub Package Registry) | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "18.x" | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: '@mitre' | ||
|
||
- name: Build the NPM Package | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Pack all items that are published | ||
run: 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 inspec-objects to GitHub Package Registry | ||
- name: Publish inspec-objects to GPR | ||
run: npm publish mitre-inspec-objects-*.tgz | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |