Skip to content

v17.4.1

v17.4.1 #70

Workflow file for this run

name: publish to npmjs
on:
release:
# it is simpler to have separate release.yml and prerelease.yml workflows,
# however, on npm you can only associate one workflow as trusted (or however
# it's called exactly) - so we need to combine both in one workflow, with
# the if conditions on the steps.
types: [released, prereleased]
jobs:
publish:
environment: npm
if: github.repository == 'sverweij/dependency-cruiser'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 26.x
registry-url: https://registry.npmjs.org
# staged publishing works as of npm@11.15.0. Until that or higher is
# shipped with nodejs by default we need to install it manually.
- run: npm install -g npm@^11.15.0
- run: |
node --version
npm --version
# legacy peer deps because otherwise typescript-eslint hard-complains
# as it can't find a suitable typescript compiler (we're on 6 now,
# ts-eslint isn't yet)
- run: npm clean-install --legacy-peer-deps
- run: node --run=build
- run: node --run=test
- name: publish as latest
run: npm stage publish --provenance --access public
if: github.event.release.prerelease == false
- name: publish as beta
run: npm stage publish --provenance --access public --tag beta
if: github.event.release.prerelease == true