Skip to content

Prune NPM tags

Prune NPM tags #290

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@v4
- name: Setup .npmrc file
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
- name: Prune tags (vocs)
run: cd src && npm view --json | jq -r '.["dist-tags"] | to_entries | .[] | select(.key != "latest") | select(.key != "main") | select(.key != "alpha") | .key' | xargs -I % npm dist-tag rm vocs %
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Prune tags (create-vocs)
run: cd create-vocs && npm view --json | jq -r '.["dist-tags"] | to_entries | .[] | select(.key != "latest") | select(.key != "main") | select(.key != "alpha") | .key' | xargs -I % npm dist-tag rm create-vocs %
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}