set package version from Directory.Build.props
This commit is contained in:
parent
4548af74d7
commit
f8db19ab20
5 changed files with 15 additions and 10 deletions
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
|
|
@ -22,8 +22,8 @@ jobs:
|
||||||
id: version
|
id: version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "version=$(sed -n 's/.*<TargetRaylibTag>\(.*\)<\/TargetRaylibTag>.*/\1/p' Raylib-cs/Raylib-cs.csproj)">> ${GITHUB_OUTPUT}
|
echo "version=$(sed -n 's/.*<TargetRaylibTag>\(.*\)<\/TargetRaylibTag>.*/\1/p' Directory.Build.props)">> ${GITHUB_OUTPUT}
|
||||||
echo "pkgversion=$(sed -n 's/.*<PackageVersion>\(.*\)<\/PackageVersion>.*/\1/p' Raylib-cs/Raylib-cs.csproj)">> ${GITHUB_OUTPUT}
|
echo "pkgversion=$(sed -n 's/.*<PackageVersion>\(.*\)<\/PackageVersion>.*/\1/p' Directory.Build.props)">> ${GITHUB_OUTPUT}
|
||||||
|
|
||||||
build-android:
|
build-android:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -235,22 +235,22 @@ jobs:
|
||||||
dotnet-version: 6.0.x
|
dotnet-version: 6.0.x
|
||||||
|
|
||||||
- name: Create NuGet Package
|
- name: Create NuGet Package
|
||||||
run: dotnet pack -c Release Raylib-cs
|
run: dotnet pack -c Release -o artifacts/nupkg
|
||||||
|
|
||||||
- name: Upload NuGet Package As Artifact
|
- name: Upload NuGet Package As Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: Raylib-cs/bin/Release/Raylib-cs.${{ needs.prepare.outputs.pkgversion }}.*pkg
|
path: artifacts/nupkg/Raylib-cs.*.*pkg
|
||||||
|
|
||||||
- name: Upload NuGet Package As Release
|
- name: Upload NuGet Package As Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
files: Raylib-cs/bin/Release/Raylib-cs.${{ needs.prepare.outputs.pkgversion }}.*pkg
|
files: artifacts/nupkg/Raylib-cs.*.*pkg
|
||||||
|
|
||||||
- name: Publish to NuGet
|
- name: Publish to NuGet
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
run: |
|
run: |
|
||||||
dotnet nuget push \
|
dotnet nuget push \
|
||||||
Raylib-cs/bin/Release/Raylib-cs.${{ needs.prepare.outputs.pkgversion }}.nupkg \
|
artifacts/nupkg/Raylib-cs.*.*pkg \
|
||||||
--api-key ${{secrets.NUGET_API_KEY}}
|
--api-key ${{secrets.NUGET_API_KEY}}
|
||||||
|
|
|
||||||
8
Directory.Build.props
Normal file
8
Directory.Build.props
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<Project>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetRaylibTag>4.5.0</TargetRaylibTag>
|
||||||
|
<PackageVersion>4.5.0.2-android.1</PackageVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
<ApplicationVersion>1</ApplicationVersion>
|
<ApplicationVersion>1</ApplicationVersion>
|
||||||
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
||||||
<EmbedAssembliesIntoApk Condition="$(Configuration) == 'Debug'">true</EmbedAssembliesIntoApk>
|
<EmbedAssembliesIntoApk Condition="$(Configuration) == 'Debug'">true</EmbedAssembliesIntoApk>
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Raylib-cs" Version="4.5.0.2" />
|
<PackageReference Include="Raylib-cs" Version="4.5.0.2" />
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
<RootNamespace>Raylib_cs.Android</RootNamespace>
|
<RootNamespace>Raylib_cs.Android</RootNamespace>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<AssemblyName>Raylibcs.Android</AssemblyName>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -11,9 +11,6 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetRaylibTag>4.5.0</TargetRaylibTag>
|
|
||||||
<Version>4.5.0.2</Version>
|
|
||||||
<PackageVersion>4.5.0.2</PackageVersion>
|
|
||||||
<Authors>Chris Dill, Raysan5</Authors>
|
<Authors>Chris Dill, Raysan5</Authors>
|
||||||
<PackProject>true</PackProject>
|
<PackProject>true</PackProject>
|
||||||
<IncludeSymbols>true</IncludeSymbols>
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue