Skip to content

Commit

Permalink
chore(ci): 使用bumpp 管理版本
Browse files Browse the repository at this point in the history
  • Loading branch information
lixin59 committed Feb 10, 2023
1 parent 9b5e0fb commit 682567f
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 20 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release
on:
push:
tags:
- '**'
- '*'

permissions:
contents: write
Expand All @@ -22,7 +22,7 @@ jobs:
node-version: 16.x
# 缓存 node_modules
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
id: yarn-cache
with:
path: |
Expand All @@ -37,23 +37,19 @@ jobs:
run: yarn --frozen-lockfile

# 运行构建脚本
- name: Build frontend
run: yarn build
# - name: Build frontend
# run: yarn build
# - name: Compressed file # 压缩dist目录
# run: zip -r omsui.zip ./dist
# - name: release # 创建release文件
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: "omsui.zip"
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# 压缩dist目录
- name: Compressed file
run: zip -r omsui.zip ./dist

# 创建release文件
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "omsui.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "Build Changelog"
- name: Create github releases
run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lint": "eslint --ext .js,.jsx,.ts,.tsx src",
"lint-staged": "lint-staged",
"prepare": "husky install",
"release": "yarn version",
"release": "bumpp --preid rc --commit \"release: v%s\" --no-push --tag",
"serve": "vite preview"
},
"browserslist": {
Expand Down Expand Up @@ -53,6 +53,7 @@
"@rjsf/core": "^4.2.2",
"@rjsf/material-ui": "^4.2.2",
"axios": "^0.24.0",
"bumpp": "^8.2.1",
"changelogithub": "^0.12.7",
"chonky": "^2.3.0",
"chonky-icon-fontawesome": "^2.3.0",
Expand Down
68 changes: 67 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,16 @@
resolved "https://registry.npmmirror.com/@humanwhocodes/object-schema/download/@humanwhocodes/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
integrity sha1-tSBSnsIdjllFoYUd/Rwy6U45/0U=

"@jsdevtools/ez-spawn@^3.0.4":
version "3.0.4"
resolved "https://registry.yarnpkg.com/@jsdevtools/ez-spawn/-/ez-spawn-3.0.4.tgz#5641eb26fee6d31ec29f6788eba849470c52c7ff"
integrity sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==
dependencies:
call-me-maybe "^1.0.1"
cross-spawn "^7.0.3"
string-argv "^0.3.1"
type-detect "^4.0.8"

"@material-ui/core@4.11.3":
version "4.11.3"
resolved "https://registry.npmmirror.com/@material-ui/core/download/@material-ui/core-4.11.3.tgz#f22e41775b0bd075e36a7a093d43951bf7f63850"
Expand Down Expand Up @@ -1602,6 +1612,18 @@ buffers@~0.1.1:
resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb"
integrity sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==

bumpp@^8.2.1:
version "8.2.1"
resolved "https://registry.yarnpkg.com/bumpp/-/bumpp-8.2.1.tgz#d337bb77662257e48876389076e103208651d1c7"
integrity sha512-4tHKsWC2mqHQvdjZ4AXgVhS2xMsz8qQ4zYt87vGRXW5tqAjrYa/UJqy7s/dGYI2OIe9ghBdiFhKpyKEX9SXffg==
dependencies:
"@jsdevtools/ez-spawn" "^3.0.4"
cac "^6.7.12"
fast-glob "^3.2.11"
kleur "^4.1.4"
prompts "^2.4.1"
semver "^7.3.5"

busboy@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893"
Expand Down Expand Up @@ -1637,7 +1659,7 @@ c12@^1.1.0:
pkg-types "^1.0.1"
rc9 "^2.0.0"

cac@^6.7.14:
cac@^6.7.12, cac@^6.7.14:
version "6.7.14"
resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959"
integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==
Expand All @@ -1650,6 +1672,11 @@ call-bind@^1.0.0, call-bind@^1.0.2:
function-bind "^1.1.1"
get-intrinsic "^1.0.2"

call-me-maybe@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz#03f964f19522ba643b1b0693acb9152fe2074baa"
integrity sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==

callsites@^3.0.0:
version "3.1.0"
resolved "https://registry.nlark.com/callsites/download/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
Expand Down Expand Up @@ -2546,6 +2573,17 @@ fast-glob@^3.1.1:
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-glob@^3.2.11:
version "3.2.12"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80"
integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
glob-parent "^5.1.2"
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.nlark.com/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
Expand Down Expand Up @@ -3400,11 +3438,21 @@ jszip@^3.5.0:
readable-stream "~2.3.6"
setimmediate "^1.0.5"

kleur@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==

kleur@^4.0.3:
version "4.1.4"
resolved "https://registry.nlark.com/kleur/download/kleur-4.1.4.tgz#8c202987d7e577766d039a8cd461934c01cda04d"
integrity sha1-jCAph9fld3ZtA5qM1GGTTAHNoE0=

kleur@^4.1.4:
version "4.1.5"
resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780"
integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==

kolorist@^1.6.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.7.0.tgz#8e22bc470ea2d2743dbd461808f8b5246b19f5f4"
Expand Down Expand Up @@ -4327,6 +4375,14 @@ progress@^2.0.0:
resolved "https://registry.nlark.com/progress/download/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
integrity sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=

prompts@^2.4.1:
version "2.4.2"
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069"
integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==
dependencies:
kleur "^3.0.3"
sisteransi "^1.0.5"

prop-types@^15.0.0, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2:
version "15.7.2"
resolved "https://registry.nlark.com/prop-types/download/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
Expand Down Expand Up @@ -4937,6 +4993,11 @@ signal-exit@^3.0.3, signal-exit@^3.0.7:
resolved "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==

sisteransi@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==

size-sensor@^1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/size-sensor/download/size-sensor-1.0.1.tgz#f84e46206d3e259faff1d548e4b3beca93219dbb"
Expand Down Expand Up @@ -5316,6 +5377,11 @@ type-check@^0.4.0, type-check@~0.4.0:
dependencies:
prelude-ls "^1.2.1"

type-detect@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==

type-fest@^0.20.2:
version "0.20.2"
resolved "https://registry.npmmirror.com/type-fest/download/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
Expand Down

0 comments on commit 682567f

Please sign in to comment.