Skip to content

Commit ce46346

Browse files
chore(ci): add npm tag action; (axios#6229)
1 parent 3b7635a commit ce46346

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/npm-tag.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: NPM Tag
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
required: true
7+
tag:
8+
required: true
9+
default: "latest"
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: git config
19+
run: |
20+
git config user.name "${GITHUB_ACTOR}"
21+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 18
25+
registry-url: https://registry.npmjs.org/
26+
############# TAG RELEASE ##############
27+
- name: Tag release
28+
run: npm dist-tag add axios@${{ github.event.inputs.version }} ${{ github.event.inputs.tag }}
29+
env:
30+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)