File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,12 @@ jobs:
2323 - name : Fetch complete repository including tags
2424 run : git fetch --tags --force --prune && git describe
2525 - name : Generate version info from git history
26- run : dotnet gitversion /output json > gitversion.json && cat gitversion.json
26+ run : dotnet gitversion /output json | jq -r 'to_entries|map("GitVersion_\(.key)=\(.value|tostring)")|.[]' >> gitversion.env && cat gitversion.env
2727 - name : Upload version info file
2828 uses : actions/upload-artifact@v1
2929 with :
3030 name : gitversion
31- path : gitversion.json
31+ path : gitversion.env
3232
3333 build :
3434 name : Build
4343 name : gitversion
4444 path : ./
4545 - name : Inject version info into environment
46- run : jq -r 'to_entries|map("::set-env name=GitVersion_\(.key)::\(.value|tostring)")|.[]' gitversion.json
46+ run : cat ./ gitversion.env >> $GITHUB_ENV
4747 - name : Build solution
4848 run : echo "Current version is \"$GitVersion_SemVer\"" && dotnet build -c Release
4949 - name : Create NuGet packages
6767 name : gitversion
6868 path : ./
6969 - name : Inject version info into environment
70- run : jq -r 'to_entries|map("::set-env name=GitVersion_\(.key)::\(.value|tostring)")|.[]' gitversion.json
70+ run : cat ./ gitversion.env >> $GITHUB_ENV
7171 - name : Run tests
7272 run : echo "Current version is \"$GitVersion_SemVer\"" && dotnet test -c Release
Original file line number Diff line number Diff line change @@ -26,12 +26,12 @@ jobs:
2626 - name : Fetch complete repository including tags
2727 run : git fetch --tags --force --prune && git describe
2828 - name : Generate version info from git history
29- run : dotnet gitversion /output json > gitversion.json && cat gitversion.json
29+ run : dotnet gitversion /output json | jq -r 'to_entries|map("GitVersion_\(.key)=\(.value|tostring)")|.[]' >> gitversion.env && cat gitversion.env
3030 - name : Upload version info file
3131 uses : actions/upload-artifact@v1
3232 with :
3333 name : gitversion
34- path : gitversion.json
34+ path : gitversion.env
3535
3636 build :
3737 name : Build
4646 name : gitversion
4747 path : ./
4848 - name : Inject version info into environment
49- run : jq -r 'to_entries|map("::set-env name=GitVersion_\(.key)::\(.value|tostring)")|.[]' gitversion.json
49+ run : cat ./ gitversion.env >> $GITHUB_ENV
5050 - name : Build solution
5151 run : echo "Current version is \"$GitVersion_SemVer\"" && dotnet build -c Release
5252 - name : Create NuGet packages
7070 name : gitversion
7171 path : ./
7272 - name : Inject version info into environment
73- run : jq -r 'to_entries|map("::set-env name=GitVersion_\(.key)::\(.value|tostring)")|.[]' gitversion.json
73+ run : cat ./ gitversion.env >> $GITHUB_ENV
7474 - name : Run tests
7575 run : echo "Current version is \"$GitVersion_SemVer\"" && dotnet test -c Release
7676
You can’t perform that action at this time.
0 commit comments