Skip to content

Commit

Permalink
ci(github): 使用changelogithub自动生成changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
lixin59 committed Feb 10, 2023
1 parent 2a42942 commit 4aef81a
Show file tree
Hide file tree
Showing 4 changed files with 384 additions and 2,672 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
name: Release
on:
push:
branches:
- master
- next
- beta
- "*.x"
tags:
- '**'

permissions:
contents: read # for checkout
contents: write

jobs:
release:
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: npm
node-version: lts/*
node-version: 16.x
# 缓存 node_modules
- name: Cache dependencies
uses: actions/cache@v2
Expand Down Expand Up @@ -56,6 +52,8 @@ jobs:
files: "omsui.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npx semantic-release

- name: "Build Changelog"
run: npx changelogithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
23 changes: 23 additions & 0 deletions changelogithub.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"types": {
"feat": { "title": "🚀 Features", "semver": "minor" },
"perf": { "title": "🔥 Performance", "semver": "patch" },
"fix": { "title": "🩹 Fixes", "semver": "patch" },
"refactor": { "title": "💅 Refactors", "semver": "patch" },
"docs": { "title": "📖 Documentation", "semver": "patch" },
"add": { "title": "➕ Add", "semver": "patch" },
"types": { "title": "🌊 Types", "semver": "patch" },
"chore": { "title": "🏡 Chore" },
"examples": { "title": "🏀 Examples" },
"test": { "title": "🧪 Tests" },
"style": { "title": "🎨 Styles" },
"ci": { "title": "🤖 CI" }
},
"scopeMap": {},
"titles": {
"breakingChanges": "🚨 Breaking Changes"
},
"contributors": true,
"capitalize": true,
"group": true
}
31 changes: 2 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,7 @@
"lint-staged": "lint-staged",
"prepare": "husky install",
"release": "yarn version",
"serve": "vite preview",
"semantic-release": "semantic-release"
},
"release": {
"branch": [
"+([0-9])?(.{+([0-9]),x}).x",
"master",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
[
"@semantic-release/npm",
{
"npmPublish": false
}
]
],
"preset": "angular"
"serve": "vite preview"
},
"browserslist": {
"production": [
Expand Down Expand Up @@ -80,6 +53,7 @@
"@rjsf/core": "^4.2.2",
"@rjsf/material-ui": "^4.2.2",
"axios": "^0.24.0",
"changelogithub": "^0.12.7",
"chonky": "^2.3.0",
"chonky-icon-fontawesome": "^2.3.0",
"echarts": "^5.2.2",
Expand Down Expand Up @@ -126,7 +100,6 @@
"husky": "^7.0.4",
"lint-staged": "^12.3.3",
"prettier": "^2.5.1",
"semantic-release": "^20.1.0",
"typescript": "^4.9.3",
"vite": "^4.0.0"
}
Expand Down
Loading

0 comments on commit 4aef81a

Please sign in to comment.