From a2b3440811eb8ec7874053195cccc2f57fa8d846 Mon Sep 17 00:00:00 2001 From: Simon G Date: Tue, 24 Sep 2019 14:24:35 +0200 Subject: [PATCH] - add deploy action workflow --- .github/workflows/deploy.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..a6e27e3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: Deploy + +on: [release] + types: [published] + +jobs: + nuget: + name: NuGet + runs-on: windows-latest + + steps: + - name: Deploy to NuGet Gallery + env: + NUGET_KEY: ${{ secrets.NUGET_KEY }} + run: + dotnet pack -c Release + cd bin\Release + dotnet nuget push LightweightIocContainer.*.nupkg -k NUGET_KEY -s https://api.nuget.org/v3/index.json + + github: + name: GitHub + runs-on: windows-latest + + steps: + - name: Deploy to GitHub Package Registry + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: + dotnet pack -c Release + nuget sources Add -Name "GithubPackageRegistry" -Source "https://nuget.pkg.github.com/OWNER/index.json" -UserName SimonG96 -Password GITHUB_TOKEN + cd bin\Release + dotnet nuget push LightweightIocContainer.*.nupkg -Source "GithubPackageRegistry"