-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 937 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: npm publish
# 发布版本触发
on:
push:
tags:
- v*
permissions:
contents: write
jobs:
publish:
if: github.event.repository.owner.id == github.event.sender.id
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 22.x
- name: Set Publishing Config
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: npm publish
run: |
cd ./cli
npm publish -r --tag latest --no-git-checks
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Automatic Releases
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false