deprecate Package Version #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deprecate Package Version | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to be deleted package@version' | |
required: true | |
jobs: | |
delete-package-version: | |
runs-on: ubuntu-latest | |
if: >- | |
github.ref == 'refs/heads/main' && | |
(github.actor == 'JackLian' || github.actor == 'liujuping') | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: deprecate Package Version | |
run: | | |
npm deprecate ${{ github.event.inputs.version }} "This version is deprecated. Please consider upgrading to a newer version." | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |