Skip to content

chore: npm token

chore: npm token #625

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: SASjs CLI Deploy
on:
push:
branches:
- main
permissions:
id-token: write # https://docs.npmjs.com/trusted-publishers
contents: read
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: |
npm config set registry https://registry.npmjs.org
npm ci
- name: Build project
run: npm run build
- name: Audit for vulnerabilities
run: npm audit --omit=dev --audit-level=low
- name: Verify npm auth
run: npm whoami --registry=https://registry.npmjs.org
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}