Skip to content

NPM Auto Deprecate #517

NPM Auto Deprecate

NPM Auto Deprecate #517

name: NPM Auto Deprecate
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
auto-deprecate:
name: NPM Auto Deprecate
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Use Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: 17
registry-url: 'https://registry.npmjs.org/'
- name: Install Node.js dependencies
run: npm i
- name: Deprecate dev versions
run: npx npm-deprecate --name "*dev*" --package "@sern/cli" --message "This is a deprecated version of @sern/cli@dev. Please use the latest dev version."
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Deprecate pr versions
run: npx npm-deprecate --name "*pr*" --package "@sern/cli" --message "This is a deprecated version of @sern/cli. Please use the latest version."
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}