Skip to content

Commit 8630021

Browse files
author
chenliuyun
committed
ci: add workflow_dispatch workflow to move npm dist-tag
1 parent 8c0169f commit 8630021

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/npm-dist-tag.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Move npm dist-tag
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Package version to point the tag at (e.g. 3.1.1)'
8+
required: true
9+
tag:
10+
description: 'dist-tag name to move'
11+
required: false
12+
default: 'latest'
13+
14+
jobs:
15+
dist-tag:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
id-token: write
20+
steps:
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 20.x
24+
registry-url: https://registry.npmjs.org
25+
- name: Move dist-tag
26+
run: npm dist-tag add @switchbot/openapi-cli@${{ inputs.version }} ${{ inputs.tag }}
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)