Skip to content

Commit 23ecb23

Browse files
liujupingJackLian
authored andcommitted
chore: add delete npm.yml
1 parent 07df40a commit 23ecb23

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/delete npm.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Delete Package Version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to be deleted package@version'
8+
required: true
9+
10+
jobs:
11+
delete-package-version:
12+
runs-on: ubuntu-latest
13+
if: >-
14+
github.ref == 'refs/heads/main' &&
15+
(github.actor == 'JackLian' || github.actor == 'liujuping')
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v2
23+
with:
24+
node-version: '14'
25+
26+
- name: Delete Package Version
27+
run: |
28+
npm unpublish ${{ github.event.inputs.version }}
29+
env:
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)