-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 修改工作流名称为 "Node.js Package" - 将触发条件改为 release 创建时 - 更新 actions/checkout 版本为 v2 - 移除设置 node 步骤中的 registry-url - 简化 npm publish 步骤并使用 NODE_AUTH_TOKEN 环境变量
- Loading branch information
Showing
2 changed files
with
40 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,20 @@ | ||
# .github/workflows/release.yml | ||
|
||
name: Release | ||
|
||
permissions: | ||
contents: write | ||
name: Node.js Package | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
release: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set node | ||
uses: actions/setup-node@v4 | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
- uses: actions/setup-node@v2 | ||
with: | ||
registry-url: https://registry.npmjs.org/ | ||
node-version: lts/* | ||
|
||
- run: npx changelogithub # or changelogithub@0.12 if ensure the stable result | ||
node-version: '14' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm publish | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# .github/workflows/release.yml | ||
|
||
name: Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set node | ||
uses: actions/setup-node@v4 | ||
with: | ||
registry-url: https://registry.npmjs.org/ | ||
node-version: lts/* | ||
|
||
- run: npx changelogithub # or changelogithub@0.12 if ensure the stable result | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |