Browse Source

add: change log

Yaavi 1 year ago
parent
commit
bb28f02d41
2 changed files with 28 additions and 7 deletions
  1. 17 7
      .github/workflows/publish.yml
  2. 11 0
      CHANGELOG.md

+ 17 - 7
.github/workflows/publish.yml

@@ -2,11 +2,8 @@ name: Node.js Package
 
 
 on:
 on:
   push:
   push:
-    branches:
-      - release
-  pull_request:
-    branches:
-      - release
+    tags:
+      - "v*"
 
 
 jobs:
 jobs:
   release:
   release:
@@ -20,8 +17,8 @@ jobs:
       - name: Setup Node.js
       - name: Setup Node.js
         uses: actions/setup-node@v4
         uses: actions/setup-node@v4
         with:
         with:
-          node-version: '20'
-          registry-url: 'https://registry.npmjs.org'
+          node-version: "20"
+          registry-url: "https://registry.npmjs.org"
 
 
       - name: Install dependencies
       - name: Install dependencies
         run: npm install
         run: npm install
@@ -32,6 +29,19 @@ jobs:
       - name: Run test script
       - name: Run test script
         run: npm run test
         run: npm run test
 
 
+      - name: Create Release
+        id: create_release
+        uses: actions/create-release@v1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
+        with:
+          tag_name: ${{ github.ref }}
+          release_name: ${{ github.ref }}
+          body: |
+            Please refer to [CHANGELOG.md](https://github.com/vsme/chinese-days/blob/main/CHANGELOG.md) for details.
+          draft: false
+          prerelease: false
+
     #   - name: Publish package
     #   - name: Publish package
     #     run: npm publish
     #     run: npm publish
     #     env:
     #     env:

+ 11 - 0
CHANGELOG.md

@@ -0,0 +1,11 @@
+# CHANGELOG
+
+## [1.1.0](https://github.com/vsme/chinese-days) (2024-05-23)
+
+### 特性
+
+- 导出 `JSON` 文件,提供给非 `JS` 项目使用。
+
+## [1.0.0](https://github.com/vsme/chinese-days) (2024-05-23)
+
+- 1.0.0 版本正式发布。