Browse Source

Merge pull request #88 from DouyinFE/ci

chore: update release workflow
zwlafk 4 years ago
parent
commit
95642bd635
2 changed files with 6 additions and 2 deletions
  1. 3 2
      .github/workflows/release.yml
  2. 3 0
      package.json

+ 3 - 2
.github/workflows/release.yml

@@ -1,7 +1,9 @@
 name: release
 
 on:
-  create
+  push:
+    tags:        
+      - 'v*'    
 
 jobs:
   release:
@@ -9,7 +11,6 @@ jobs:
     steps:
       - uses: actions/checkout@v2
       - name: release
-        if: github.event.ref_type == 'tag'
         uses: actions/setup-node@v2
         with:
           node-version: 14

+ 3 - 0
package.json

@@ -88,6 +88,8 @@
     "wcag-color": "^1.1.1"
   },
   "devDependencies": {
+    "@actions/core": "^1.6.0",
+    "@actions/github": "^5.0.0",
     "@babel/cli": "^7.14.8",
     "@babel/core": "^7.15.0",
     "@babel/eslint-parser": "^7.15.0",
@@ -103,6 +105,7 @@
     "@babel/types": "^7.15.4",
     "@commitlint/cli": "^9.1.2",
     "@commitlint/config-conventional": "^7.6.0",
+    "@octokit/rest": "^18.12.0",
     "@shopify/jest-dom-mocks": "^2.11.7",
     "@storybook/addon-actions": "^6.3.7",
     "@storybook/addon-knobs": "^6.3.1",