Skip to content

Commit

Permalink
fix: update workflow template to deploy to github packages
Browse files Browse the repository at this point in the history
  • Loading branch information
seansica committed Oct 14, 2024
1 parent e139933 commit 0ac9ef0
Showing 1 changed file with 13 additions and 26 deletions.
39 changes: 13 additions & 26 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,24 @@
name: Publish to GitHub Packages

name: Publish package to GitHub Packages
on:
push:
branches:
- main

jobs:
publish:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
node-version: '22.x'
registry-url: 'https://npm.pkg.github.com'

- name: Install dependencies
run: npm install

- name: Clear cache
run: rm -rf .cached_stix_data

- name: Run tests
run: npm test

- name: Build the package
run: npm ci

- name: Publish to GitHub Packages
run: npm publish --provenance --access public
scope: '@mitre-attack'
- run: npm ci
- run: npm test
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0ac9ef0

Please sign in to comment.