Skip to content

Prune NPM tags

Prune NPM tags #528

Workflow file for this run

name: Prune NPM tags
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
prune:
name: Prune NPM tags
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: 'recursive'
- name: Setup .npmrc file
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
registry-url: 'https://registry.npmjs.org'
- name: Prune tags
run: cd src && npm view --json | jq -r '.["dist-tags"] | to_entries | .[] | select(.key != "latest") | .key' | xargs -I % npm dist-tag rm frog %
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}