diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 7acb426..2fbff13 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -31,7 +31,6 @@ jobs: generate_release_notes: true draft: true - # - name: Publish nuget package - # if: startsWith(github.ref, 'refs/tags/') - # run: .\publishnuget.ps1 - # run: nuget push pkgbuild/*.nupkg -ApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json + - name: Publish nuget package + if: startsWith(github.ref, 'refs/tags/') + run: .\publishnuget.ps1 -ApiKey ${{ secrets.NUGET_API_KEY }} diff --git a/package/package.nuspec b/package/package.nuspec index 70d10bf..7bffc27 100644 --- a/package/package.nuspec +++ b/package/package.nuspec @@ -2,7 +2,7 @@ false - 0.1 + 0.1.1-alpha OriDeModLoader Ori DE Mod Loader Kirefel diff --git a/publishnuget.ps1 b/publishnuget.ps1 index 61871ed..06b3341 100644 --- a/publishnuget.ps1 +++ b/publishnuget.ps1 @@ -1,4 +1,8 @@ +param([Parameter(Mandatory)] [string] $ApiKey) + cp build\OriDeModLoader.dll package\lib\net35\ cp build\Assembly-CSharp.dll package\lib\net35\ cp build\UnityEngine.dll package\lib\net35\ nuget pack package -OutputDirectory pkgbuild + +nuget push pkgbuild\*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey $ApiKey