Skip to content

Commit 32bd34e

Browse files
committed
try to set version from actions
1 parent b31393c commit 32bd34e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ jobs:
2828
uses: actions/setup-dotnet@v2
2929
with:
3030
dotnet-version: 6.0.x
31+
- name: Set Version
32+
run: echo ${{ github.ref_name }} | sed -r "s/^v/GDAPI_VERSION=/" >> $GITHUB_ENV
3133
- name: Restore dependencies
3234
run: dotnet restore ./GeometryDashAPI.sln
3335
- name: Release build
3436
run: dotnet build -c Release ./GeometryDashAPI/GeometryDashAPI.csproj
3537
- name: Pack
36-
run: dotnet pack -c Release -o ./pack/ ./GeometryDashAPI/GeometryDashAPI.csproj
38+
run: dotnet pack -c Release -o ./pack/ /p:PackageVersion=$GDAPI_VERSION ./GeometryDashAPI/GeometryDashAPI.csproj
3739
- name: Push to NuGet
3840
run: dotnet nuget push ./pack/GeometryDashAPI*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate

GeometryDashAPI/GeometryDashAPI.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
66
<Authors>Folleach</Authors>
77
<NeutralLanguage>en</NeutralLanguage>
8-
<Version>0.1.1</Version>
98
<Description>API for game Geometry Dash</Description>
109
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1110
<RepositoryUrl>https://github.com/Folleach/GeometryDashAPI</RepositoryUrl>
1211
<RepositoryType>git</RepositoryType>
1312
<PackageTags>api, geometry, dash</PackageTags>
14-
<PackageVersion>0.1.16</PackageVersion>
1513
<LangVersion>9</LangVersion>
1614
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1715
</PropertyGroup>

0 commit comments

Comments
 (0)