Skip to content

Prune NPM tags

Prune NPM tags #40

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