Watch
2
0
Fork
You've already forked raylib-cs
0

set package version from Directory.Build.props

This commit is contained in:
anggape 2023-07-26 11:00:56 +07:00
commit f8db19ab20
No known key found for this signature in database
GPG key ID: 318EF680D0181D86
5 changed files with 15 additions and 10 deletions

View file

@ -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
View file

@ -0,0 +1,8 @@
<Project>
<PropertyGroup>
<TargetRaylibTag>4.5.0</TargetRaylibTag>
<PackageVersion>4.5.0.2-android.1</PackageVersion>
</PropertyGroup>
</Project>

View file

@ -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" />

View file

@ -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>

View file

@ -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>