Skip to content

Unpublish NPM package #3

Unpublish NPM package

Unpublish NPM package #3

Workflow file for this run

name: Unpublish NPM package
on:
workflow_dispatch:
inputs:
packagespec:
description: 'Package spec'
required: true
type: string
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- name: Unpublish package
run: npm unpublish ${{ github.event.inputs.packagespec }} --force
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}