Skip to content

NPM Auto Deprecate #222

NPM Auto Deprecate

NPM Auto Deprecate #222

name: NPM Auto Deprecate
on:
schedule:
- cron: '0 0 * * *'
jobs:
auto-deprecate:
name: NPM Auto Deprecate
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Use Node.js v18
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Restore CI Cache
uses: actions/cache@v4
id: cache-restore
with:
path: node_modules
key: ${{ runner.os }}-18-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies if Cache Miss
if: ${{ !steps.cache-restore.outputs.cache-hit }}
run: yarn --frozen-lockfile
- name: Deprecate versions
run: yarn npm-deprecate
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}