File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 with :
4141 working_directory : Packages/Federation.Sdk/Source
4242 dotnet_version : 9.0.x
43- base_version : " 1.0"
4443 secrets : inherit
4544
4645 # publish this package if there are changes in the corresponding path
5150 with :
5251 working_directory : Packages/Federation.Sdk.Contracts/Source
5352 dotnet_version : 9.0.x
54- base_version : " 1.0"
5553 secrets : inherit
Original file line number Diff line number Diff line change 1414 type : string
1515 default : 9.0.x
1616
17- base_version :
18- description : base semantic version
19- required : false
20- type : string
21- default : " 1.0"
22-
2317 publish_package :
2418 description : if false, runs restore/build/pack without pushing
2519 required : false
3832 working-directory : ${{ inputs.working_directory }}
3933
4034 steps :
35+ - name : setup gitversion
36+ uses : gittools/actions/gitversion/setup@v0
37+ with :
38+ versionSpec : ' 5.x'
39+
40+ - name : semantic versioning
41+ uses : gittools/actions/gitversion/execute@v0
42+ id : gitversion
43+
4144 - name : checkout code
4245 uses : actions/checkout@v5
4346
@@ -57,18 +60,10 @@ jobs:
5760
5861 - name : set version and pack
5962 id : pack
60- env :
61- BASE_VERSION : ${{ inputs.base_version }}
6263 run : |
63- if [[ "${GITHUB_REF}" == "refs/heads/master" ]]; then
64- VERSION="${BASE_VERSION}.${GITHUB_RUN_NUMBER}"
65- else
66- VERSION="${BASE_VERSION}-beta.${GITHUB_RUN_NUMBER}"
67- fi
68-
64+ VERSION="${{ steps.gitversion.outputs.semVer }}"
6965 echo "use version: $VERSION"
7066 dotnet pack -c Release -p:PackageVersion=$VERSION -o ./output --no-build
71-
7267 echo "package_version=$VERSION" >> $GITHUB_OUTPUT
7368
7469 - name : push package to nuget
You can’t perform that action at this time.
0 commit comments