Skip to content

Update package.json

Update package.json #9

Workflow file for this run

name: Release
on:
push:
branches:
- main
- next
- beta
- alpha
pull_request:
permissions:
contents: read # for checkout
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
- name: Install dependencies
run: npm ci
- name: Commitlint check
uses: wagoid/commitlint-github-action@v5
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Note: Automatically populated GITHUB_TOKEN cannot be used if branch protection is enabled
# for the target branch. If the risk is acceptable, some extra configuration is needed. The
# actions/checkout persist-credentials option needs to be false, otherwise the generated
# GITHUB_TOKEN will interfere with the custom one.
# ref: https:/semantic-release/semantic-release/blob/master/docs/recipes/ci-configurations/github-actions.md#pushing-packagejson-changes-to-your-repository
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@mitre-attack'
- name: Install
run: npm clean-install
- name: Build
run: npm run build
- name: Test
run: npm run test
- name: Upload test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: test-logs
path: .test-logs/
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}