diff --git a/.github/workflows/docker-image.yml b/.github/workflows/build-docker-image.yml similarity index 100% rename from .github/workflows/docker-image.yml rename to .github/workflows/build-docker-image.yml diff --git a/.github/workflows/code-ci.yml b/.github/workflows/code-lintfix.yml similarity index 97% rename from .github/workflows/code-ci.yml rename to .github/workflows/code-lintfix.yml index 8fdea76..9fe66ac 100644 --- a/.github/workflows/code-ci.yml +++ b/.github/workflows/code-lintfix.yml @@ -1,5 +1,5 @@ # 构建Docker镜像 -name: Code-CI +name: Code-LintFix ## 触发条件 on: @@ -40,5 +40,6 @@ jobs: - name: Code Fix run: ./scripts/lint --fix + - name: Build Site run: ./scripts/bundle build diff --git a/.github/workflows/esc-deploy.yml b/.github/workflows/esc-deploy.yml index d8dbb09..d816938 100644 --- a/.github/workflows/esc-deploy.yml +++ b/.github/workflows/esc-deploy.yml @@ -1,5 +1,5 @@ # 部署到服务器 -name: Deploy-ESC +name: ESC-Deploy on: ## 推送到master diff --git a/.github/workflows/github-deploy.yml b/.github/workflows/github-page-deploy.yml similarity index 100% rename from .github/workflows/github-deploy.yml rename to .github/workflows/github-page-deploy.yml diff --git a/.github/workflows/release.yml b/.github/workflows/github-version-release.yml similarity index 71% rename from .github/workflows/release.yml rename to .github/workflows/github-version-release.yml index 026ecfa..37cc3b9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/github-version-release.yml @@ -5,14 +5,13 @@ on: push: tags: - 'v*' - branches: - - master workflow_dispatch: jobs: release: name: Create Release runs-on: ubuntu-latest + if: github.repository == '142vip/408CSFamily' steps: - name: Checkout Code @@ -36,25 +35,30 @@ jobs: - name: Create Zip Archive run: | zip -r 408CSFamily.zip . \ - -x "node_modules" + -x "node_modules/*" + # 提取版本号 + - name: Extract Version + id: extract_version + run: echo "::set-output name=version::$(node -p "require('./package.json').version")" + + + # 创建发布版本 - name: Create Release id: create_release uses: actions/create-release@latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} -# body: | -# Release ${{ github.ref }} -# - Add feature A -# - Fix bug B - body_path: CHANGELOG.md - ## 是否为草稿、是否为预发布 - draft: true - prerelease: true + tag_name: v${{ steps.extract_version.outputs.version }} + release_name: Release v${{ steps.extract_version.outputs.version }} + body: | + + ### Features + ### Bug Fixes + + ## 更新资源 - name: Upload Assets uses: actions/upload-release-asset@latest env: diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index f1b18b6..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,92 +0,0 @@ -# Release history - -All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - - - -## 0.0.1-alpha.1 (2023-09-07) - - -### Features - -* add vercel script ([a354acc](https://github.com/mmdapl/408CSFamily/commit/a354acced9f9485e0aa2634ac227ab97657de14d)) -* add vercel script ([31b8710](https://github.com/mmdapl/408CSFamily/commit/31b87103c4e0fdbffe7e18ad99e1c2bdc1941248)) -* add version ([09d6f2c](https://github.com/mmdapl/408CSFamily/commit/09d6f2ce315dc02b02f6ed6a468b614bb5f22810)) -* **ci:** 添加github CI流水线 ([a068b9c](https://github.com/mmdapl/408CSFamily/commit/a068b9cf566c3670382131d2a7ce057f773e6163)) -* delete ([03961a2](https://github.com/mmdapl/408CSFamily/commit/03961a216df2b43da4bc2541a36e8424f835ecc9)) -* delete docs ,no value ([264e76a](https://github.com/mmdapl/408CSFamily/commit/264e76a03a1f7b4a9266124a270f6c2f72d4e358)) -* delete file ([f453113](https://github.com/mmdapl/408CSFamily/commit/f453113304ef85db6304808be89926f16a971b5d)) -* docs update ([e4299a8](https://github.com/mmdapl/408CSFamily/commit/e4299a8bddfe78a583b082822011442478dfb6ff)) -* docs更新 ([bc9a970](https://github.com/mmdapl/408CSFamily/commit/bc9a970e6a0f822751256c7cf6cdb1612d8cbd77)) -* docs目录调整,新增文档 ([#2](https://github.com/mmdapl/408CSFamily/issues/2)) ([9219edb](https://github.com/mmdapl/408CSFamily/commit/9219edb7be3d63a19d1558b1d3d712fab4908762)) -* lock version ([5620020](https://github.com/mmdapl/408CSFamily/commit/5620020b7f068cb4be98cf2c80ffad8547e756ee)) -* test ([1f3e23f](https://github.com/mmdapl/408CSFamily/commit/1f3e23fa742916fbbae7120a7470056c927a6a0f)) -* update ([8673a64](https://github.com/mmdapl/408CSFamily/commit/8673a64409d646195122835828ffe14be265c97a)) -* update ([0842ce3](https://github.com/mmdapl/408CSFamily/commit/0842ce327600700d2406dba560048cbe25718447)) -* update ([6dd36f3](https://github.com/mmdapl/408CSFamily/commit/6dd36f328a375cd04317e49b2d67e112b8b374b5)) -* update ([a0dc6ce](https://github.com/mmdapl/408CSFamily/commit/a0dc6ce9e6957a8d23059701b6a50269683965eb)) -* update ([19f379e](https://github.com/mmdapl/408CSFamily/commit/19f379e12325fa8e405c97ec8f36ed5eddd6756c)) -* update ([8758f56](https://github.com/mmdapl/408CSFamily/commit/8758f56d2a4fa721d3a0c31eda5470db1f9af954)) -* update ([4cca7ba](https://github.com/mmdapl/408CSFamily/commit/4cca7bae38e48a5be4a312a928c41334e0e60ba1)) -* update ([836d942](https://github.com/mmdapl/408CSFamily/commit/836d9423065dc9ff8e4ccfbcb9e9bd772403b1ef)) -* update ([212cf68](https://github.com/mmdapl/408CSFamily/commit/212cf6812e14970340411eb036b38ca8c62182f5)) -* update ([faf57c4](https://github.com/mmdapl/408CSFamily/commit/faf57c44f37c050eb9c7f2135434fd5cbc47a196)) -* update ([eb51928](https://github.com/mmdapl/408CSFamily/commit/eb5192819b92bd4c4b5cdc003d1cac12e4fefd9a)) -* update ([9c61295](https://github.com/mmdapl/408CSFamily/commit/9c6129575f8d6c965f0484799a2b747757e098bb)) -* update ([476db37](https://github.com/mmdapl/408CSFamily/commit/476db373d513d0166d2f6a073fd1324bce456093)) -* update ([3ebbfad](https://github.com/mmdapl/408CSFamily/commit/3ebbfad65bb4b5964d59326be2abe4b27844249b)) -* update ([f989110](https://github.com/mmdapl/408CSFamily/commit/f989110774ad2a00a2a5fb9ca6b51d42acb55a59)) -* update ci ([372dc79](https://github.com/mmdapl/408CSFamily/commit/372dc792c7861a879ff686747fb8c76bd70f4761)) -* update ci ([16d6909](https://github.com/mmdapl/408CSFamily/commit/16d690954f984d7b69d1881d2967a1bf20c44438)) -* update ci ([9febb9f](https://github.com/mmdapl/408CSFamily/commit/9febb9fb3283bf95e52442f29614c845da8b8bb6)) -* update ci ([ca91d78](https://github.com/mmdapl/408CSFamily/commit/ca91d78f22d8905ac71148abf96c88db1a5cdc16)) -* update ci ([0b39b09](https://github.com/mmdapl/408CSFamily/commit/0b39b09e0ebd270a524ce090faabfe575c1303c0)) -* update docs ([c0c0e22](https://github.com/mmdapl/408CSFamily/commit/c0c0e223e2257ae743da6a259bc465a87bc10c99)) -* update font ([dba1ba4](https://github.com/mmdapl/408CSFamily/commit/dba1ba4bbaa907ef1465af18e4a6b2c29a92c71a)) -* update json ([6a58084](https://github.com/mmdapl/408CSFamily/commit/6a58084f43d13d36a05b10b33e097703180ef7d1)) -* update node version ([507ff83](https://github.com/mmdapl/408CSFamily/commit/507ff838f71ab2360e49ef422f6fe969a36882a8)) -* update sync ci ([c357991](https://github.com/mmdapl/408CSFamily/commit/c357991e49a1513f67b92167426c57d68c711c14)) -* 优化脚本 ([e3d5fba](https://github.com/mmdapl/408CSFamily/commit/e3d5fbad7814d0cb652484e0eb5acbdcbe2d940b)) -* 侧边栏更新 ([c3cbc03](https://github.com/mmdapl/408CSFamily/commit/c3cbc0353aefc17e57dda974b24c0da215ec9163)) -* 修复 docs ([f5daee2](https://github.com/mmdapl/408CSFamily/commit/f5daee2ae39a69aeb8d2630b7f17ce116243b1c3)) -* 修复文档,新增算法代码 ([8262d7a](https://github.com/mmdapl/408CSFamily/commit/8262d7ab42566e2d32c62f1f9091cc39062e0b07)) -* 修改408镜像构建环境变量 ([ec137a8](https://github.com/mmdapl/408CSFamily/commit/ec137a8eec59ee9c5293fcfb17fa224e7176cfd4)) -* 修改page页面deploy脚本 ([53364e4](https://github.com/mmdapl/408CSFamily/commit/53364e49114e7cbbd774594ce8bfcc84010fcf65)) -* 修改代码 ([6d81d17](https://github.com/mmdapl/408CSFamily/commit/6d81d1706a9d55bdd810b066fef519b84c020080)) -* 修改侧边栏结构,优化镜像构建脚本 ([be28c0f](https://github.com/mmdapl/408CSFamily/commit/be28c0ff8357d508e466a463aa83e5b3ffd39524)) -* 修改导航栏配置 ([1dae053](https://github.com/mmdapl/408CSFamily/commit/1dae053473397ad324070d144f2072117e17df68)) -* 修改本地镜像 ([497fd0d](https://github.com/mmdapl/408CSFamily/commit/497fd0d9cf52624859ba8fa59a4db947dfe2931e)) -* 修改目录结构,优化hope主题配置 ([47c5b60](https://github.com/mmdapl/408CSFamily/commit/47c5b60c00b465dc273578a59f2e2795d98f2623)) -* 修改目录结构,优化部署脚本 ([aa12809](https://github.com/mmdapl/408CSFamily/commit/aa1280912abe70335958acc9aeb9db2b794a92a7)) -* 修改目录配置,替换pnpm包管理 ([3a41711](https://github.com/mmdapl/408CSFamily/commit/3a417110aa5ff6e481112a6a5ad2d3e2a4b30f6a)) -* 修改编译、打包流程,优化脚本 ([cfa50ae](https://github.com/mmdapl/408CSFamily/commit/cfa50ae38e27ada63d0d9526fe3a22ea8d4cfc28)) -* 修正脚本异常 ([c003e11](https://github.com/mmdapl/408CSFamily/commit/c003e11b8044bfdf1ff7151f04f9c03fea777095)) -* 废弃eslint校验规则,专注408内容 ([34f9eb4](https://github.com/mmdapl/408CSFamily/commit/34f9eb419c1a72552a19c906a8c64b83574dd293)) -* 文档更新 ([0d947c7](https://github.com/mmdapl/408CSFamily/commit/0d947c74c20dbdf170cc49f0281ff4b196b6b206)) -* 新增CI ([6d71d0b](https://github.com/mmdapl/408CSFamily/commit/6d71d0be92217696146a247132778c22603391ee)) -* 新增CI ([760858b](https://github.com/mmdapl/408CSFamily/commit/760858b55049a8c127d2a667d5a8071100af0035)) -* 新增release发布脚本 ([d94f30a](https://github.com/mmdapl/408CSFamily/commit/d94f30aa20063cd1c8bd9b08f63acf484fe2e698)) -* 新增scripts脚本说明 ([32d42f7](https://github.com/mmdapl/408CSFamily/commit/32d42f77bb5103760794994c0481d7d9b632d1d4)) -* 新增vercel部署ci ([bc59fea](https://github.com/mmdapl/408CSFamily/commit/bc59fea739b0e20497ac86daf06a2bdbb11f8cf5)) -* 新增vercel部署ci ([8ffae5e](https://github.com/mmdapl/408CSFamily/commit/8ffae5e09049743f319cc4135476884c2beb3cb4)) -* 新增在线预览地址 ([0d53180](https://github.com/mmdapl/408CSFamily/commit/0d531806413e756f169dd21621d4ab02d176299c)) -* 新增构建脚本,优化build-proxy ([4e875e3](https://github.com/mmdapl/408CSFamily/commit/4e875e32dfbd4efefec316b3ec3a01e4b2306363)) -* 新增默认主题样式 ([c7137f6](https://github.com/mmdapl/408CSFamily/commit/c7137f6f108cbe1a976656924711282c074f4e70)) -* 更新vuepress相关模块版本 ([a144154](https://github.com/mmdapl/408CSFamily/commit/a144154f9340fb07688e361194ce722c1614f1ec)) -* 更新主题博客设置 ([9a9b4aa](https://github.com/mmdapl/408CSFamily/commit/9a9b4aadee73849ad21b0883f633c54e7a5fde87)) -* 更新文档 ([6a1567c](https://github.com/mmdapl/408CSFamily/commit/6a1567cd2e9bf3942b50442085cab5c60b437227)) -* 站点在线预览地址 ([3a4794a](https://github.com/mmdapl/408CSFamily/commit/3a4794a581f24b4d6bf5cd2b70b8289dbf69ac8e)) -* 脚本优化 ([298f25f](https://github.com/mmdapl/408CSFamily/commit/298f25fef6424673d9eddd6bff734afb58913e49)) -* 脚本优化更新 ([c072b3d](https://github.com/mmdapl/408CSFamily/commit/c072b3d3a4ae70d542a59b52babb1d67b4102230)) -* 配置百度统计 ([c420e7f](https://github.com/mmdapl/408CSFamily/commit/c420e7fd588fa8dcbc6c9832582ac50829f73261)) -* 采用官方主题theme-hope ([278ff3e](https://github.com/mmdapl/408CSFamily/commit/278ff3e4bd7581cb0e8d461cc4086a5442918eea)) -* 锁定依赖模块 ([8188aef](https://github.com/mmdapl/408CSFamily/commit/8188aef4f3b9870ebba78f09ff703e0f12a5f671)) - - -### Bug Fixes - -* docs目录调整,新增manuscript底稿目录 ([e213378](https://github.com/mmdapl/408CSFamily/commit/e213378754d7f70184edd0c8089757507987e317)) -* **nginx:** 更新alpine镜像, ([70798e3](https://github.com/mmdapl/408CSFamily/commit/70798e3dfd5244f4a255e08e7de8f5de94eb617f)) -* 修改docs ([7fcdfb8](https://github.com/mmdapl/408CSFamily/commit/7fcdfb829fe8ec51b211e7c007049f127db1fa7d)) -* 修改配置 ([8fc49a1](https://github.com/mmdapl/408CSFamily/commit/8fc49a1b4242bffd5e29b93de02e790afcfa9c63)) -* 部署脚本修改 ([bac72ff](https://github.com/mmdapl/408CSFamily/commit/bac72ffaa554547de1973988262949725fa2c77e)) diff --git a/package.json b/package.json index 572b8b3..c5babb1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "408CSFamily", "description": "专业代号408,计算机基础知识点合集", - "version": "0.0.1-alpha.1", + "version": "0.0.1-alpha.0", "packageManager": "pnpm@7.2.1", "engines": { "node": "14.x || 16.x || 18.x", diff --git a/scripts/release b/scripts/release index 69df229..2a0a139 100755 --- a/scripts/release +++ b/scripts/release @@ -6,12 +6,10 @@ ## 使用: ./scripts/release ## - - ## 利用commit-and-tag-version生成changelog文档,并跳过commit、tag操作 readonly generateChangeLog='pnpm commit-and-tag-version && git add CHANGELOG.md' ## git提交信息 -readonly commitInfo='v%s' +readonly commitInfo='chore(release): publish v%s' bumpp --preid alpha --execute="$generateChangeLog" --commit "$commitInfo" --all --tag --push \ No newline at end of file