Skip to content

Commit f1d57c1

Browse files
committed
Publish pre-release versions to NuGet
1 parent ecef4a1 commit f1d57c1

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/nuget.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Publish to NuGet
22
on:
3+
push:
4+
branches: [ master ]
35
release:
46
types: [ created ]
57

@@ -9,11 +11,19 @@ jobs:
911
runs-on: windows-latest
1012
steps:
1113
- uses: actions/checkout@v2
14+
1215
- name: Set up .NET
1316
uses: actions/setup-dotnet@v1
1417
with:
1518
dotnet-version: "5.0.x"
16-
- name: Pack .nupkg
19+
20+
- name: Pack .nupkg (Release)
21+
if: ${{ github.event_name == 'release' }}
1722
run: dotnet pack -c Release -o dist
23+
24+
- name: Pack .nupkg (Pre-Release)
25+
if: ${{ github.event_name == 'push' }}
26+
run: dotnet pack -c Release -o dist --version-suffix "${{ github.sha }}"
27+
1828
- name: Publish to NuGet
1929
run: dotnet nuget push dist\* --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,4 +402,6 @@ ASALocalRun/
402402
.mfractor/
403403

404404
# Local History for Visual Studio
405-
.localhistory/
405+
.localhistory/
406+
407+
dist/

OVRSharp/OVRSharp.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
1414
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1515
<Product>OVRSharp</Product>
16-
<Version>1.0.2</Version>
16+
<VersionPrefix>1.0.3</VersionPrefix>
17+
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
1718
</PropertyGroup>
1819

1920
<ItemGroup>

0 commit comments

Comments
 (0)