Workflow file for this run
This file contains hidden or 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
| name: Push @mitre/inspec-objects to NPM | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write # required for trusted publishing's use of OIDC | |
| contents: read | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Manually update npm to 11.5.1 or later which is the required version for trusted publishing to work # this step can be removed after the ubuntu runner has the correct minimum version of npm installed | |
| run: npm install -g npm@latest | |
| - name: Install project dependencies | |
| run: npm ci | |
| - name: Remove testing resources | |
| run: rm -rf test | |
| - name: Build | |
| run: npm run build | |
| - name: Pack all items that are published as packages | |
| run: npm pack | |
| - name: Publish inspec-objects to NPM | |
| run: npm publish --access public mitre-inspec-objects-*.tgz |