mirror of
https://github.com/run-llama/llamaindex.net.git
synced 2026-07-01 20:36:58 -04:00
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:
@@ -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 .
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Version>0.0.0</Version>
|
||||
<Version>$(VersionPrefix)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Version>0.0.0</Version>
|
||||
<Version>$(VersionPrefix)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
Reference in New Issue
Block a user