Update build and pack steps in dotnet.yml workflow

- Set the build version dynamically using the GitHub run number
- Update the sed command to replace the version in PROJECT_FILE with the GitHub run number
- Modify the pack step to include VersionPrefix and ReleaseNotes parameters from GitHub event release tag name and body respectively

Update LlamaIndex.Core.csproj and LlamaParse.csproj files

- Change the Version property to use $(VersionPrefix) variable instead of hardcoding it as 0.0.0
This commit is contained in:
Diego Colombo
2024-06-26 01:35:30 +01:00
parent dbf243287e
commit 3eb4023984
3 changed files with 4 additions and 8 deletions
+2 -6
View File
@@ -24,11 +24,7 @@ jobs:
- name: Install .NET Aspire workload
run: dotnet workload install aspire
- name: Set version
run: |
echo "Buid version is ${{github.run_number}}"
sed -i "s/\(<Version>\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{github.run_number}}/" ${{env.PROJECT_FILE}}
- name: Restore dependencies
run: dotnet restore
- name: Build
@@ -36,4 +32,4 @@ jobs:
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Pack nugets
run: dotnet pack -c Release --output .
run: dotnet pack -c Release -p VersionPrefix=${{github.event.release.tag_name}} -p ReleaseNotes="${{github.event.release.body}}" --output .
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<Version>0.0.0</Version>
<Version>$(VersionPrefix)</Version>
</PropertyGroup>
<PropertyGroup>
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<Version>0.0.0</Version>
<Version>$(VersionPrefix)</Version>
</PropertyGroup>
<PropertyGroup>