Skip to content

Commit

Permalink
Changing GitVersion configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutomi committed Jul 2, 2024
1 parent ff3e4c2 commit 0b48f30
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,20 @@ jobs:
run: dotnet restore

- name: Setup GitFlow
uses: gittools/actions/gitversion/setup@v0
uses: gittools/actions/gitversion/setup@v1.1.1
with:
versionSpec: '5.x'

- name: Determine Version
uses: gittools/actions/gitversion/execute@v0
uses: gittools/actions/gitversion/execute@v1.1.1
with:
updateAssemblyInfo: true

- name: Build
run: dotnet build -c Release --no-restore /p:Version="${{ env.GitVersion_SemVer }}-alpha.${{ env.GitVersion_preReleaseTag }}" /p:AssemblyVersion="${{ env.GitVersion_SemVer }}" /p:FileVersion="${{ env.GitVersion_SemVer }}"
# - name: Build
# run: dotnet build -c Release --no-restore /p:Version="${{ env.GitVersion_SemVer }}-alpha.${{ env.GitVersion_preReleaseTag }}" /p:AssemblyVersion="${{ env.GitVersion_SemVer }}" /p:FileVersion="${{ env.GitVersion_SemVer }}"

- name: Pack the Nuget Packages
run: dotnet pack -c Release --no-build --no-restore --include-symbols --include-source --output nupkgs /p:PackageVersion="${{ env.GitVersion_SemVer }}-alpha.${{ env.GitVersion_preReleaseTag }}"
run: dotnet pack -c Release --no-build --no-restore --include-symbols --include-source --output nupkgs /p:PackageVersion="${{ env.GitVersion_NuGetVersionV2 }}"

- name: Publish the Nuget Packages to the GitHub Package Registry
run: dotnet nuget push **/*.nupkg --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/deveel/index.json"
Expand Down
37 changes: 37 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
mode: ContinuousDeployment
branches:
main:
tag: ''
increment: Patch
regex: ^main$
source-branches: ['feature', 'release', 'hotfix']
prevent-increment-of-merged-branch-version: true
tracks-release-branches: true
is-release-branch: true
feature:
tag: useBranchName
increment: Inherit
regex: ^feature[-/]
source-branches: ['main']
tracks-release-branches: false
is-release-branch: false
release:
tag: rc
increment: None
regex: ^release[-/]
source-branches: ['main', 'feature']
tracks-release-branches: true
is-release-branch: true
hotfix:
tag: ''
increment: Patch
regex: ^hotfix[-/]
source-branches: ['main', 'release']
tracks-release-branches: false
is-release-branch: false
ignore:
sha: []
merge-message-formats: {}
commit-message-incrementing: Enabled
assembly-versioning-scheme: MajorMinorPatch
continuous-delivery-fallback-tag: ci

0 comments on commit 0b48f30

Please sign in to comment.