Skip to content

Commit

Permalink
feat: add auto publishing to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
favoyang committed Jan 5, 2020
1 parent ba4c4d2 commit 2ff5cf3
Show file tree
Hide file tree
Showing 4 changed files with 5,943 additions and 27 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,20 @@ jobs:
run: npm install
- name: npm run test
run: npm run test

release:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'
steps:
- name: Release
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/exec
@semantic-release/changelog@3.0.0
@semantic-release/git
branch: master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
14 changes: 14 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"tagFormat": "${version}",
"plugins": [
["@semantic-release/commit-analyzer", { "preset": "angular" }],
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", { "preset": "angular" }],
["@semantic-release/git", {
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
"@semantic-release/github",
"@semantic-release/npm"
]
}
Loading

0 comments on commit 2ff5cf3

Please sign in to comment.