-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1118 from colinin/micro-template
chore: Update the microservice startup template.
- Loading branch information
Showing
38 changed files
with
661 additions
and
424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<TargetFramework>net9.0</TargetFramework> <!-- 或其他适合的框架 --> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<PackageId>LINGYUN.Abp.MicroService.Templates</PackageId> | ||
<Version>8.3.4</Version> | ||
<Version>9.0.4</Version> | ||
<Authors>[email protected]</Authors> | ||
<Description>Abp framework micro-service template</Description> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
image: mcr.microsoft.com/dotnet/sdk:9.0 | ||
|
||
stages: | ||
- build | ||
- test | ||
- tag | ||
|
||
build_job: | ||
stage: build | ||
script: | ||
- echo "[ProjectName] - Build project..." | ||
- dotnet build --configuration Release | ||
only: | ||
- dev | ||
|
||
test_job: | ||
stage: test | ||
script: | ||
- echo "[ProjectName] - Unit testing..." | ||
- dotnet test --no-build --configuration Release | ||
dependencies: | ||
- build_job | ||
only: | ||
- dev | ||
|
||
tag_job: | ||
stage: tag | ||
only: | ||
- main | ||
script: | ||
- echo "[ProjectName] - Tag project..." | ||
# 获取 common.props 中定义的版本号 | ||
- export VERSION=$(sed -n 's/.*<Version>\([0-9]*\.[0-9]*\.[0-9]*\)<\/Version>.*/\1/p' common.props) | ||
- echo $VERSION | ||
|
||
# 此处 yougitlab.com 替换为自己的 gitlab 服务器 | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "GitLab CI Bot" | ||
|
||
- git tag -f $VERSION | ||
# 此处 yougitlab.com 替换为自己的 gitlab 服务器, 如未启用 https, 变更为 http://oauth2:[email protected]/$CI_PROJECT_PATH.git | ||
# 此处 $GITLAB_TOKEN 需要在gitlab服务器中配置 GITLAB_TOKEN 变量 | ||
- git remote set-url origin https://oauth2:[email protected]/$CI_PROJECT_PATH.git | ||
- git push --force origin $VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.