Add a GitHub action to push NuGet packages when a release is created
This commit won't actually push anything - but it will allow us to test things before we *do* manually create a release. Once testing is completed, we'll want to use a (suitably encrypted) NuGet API key to push to NuGet. Note that this initially assumes we want to release all packages at the same time. We'll want to change it when we reach GA for 2.0.0. Signed-off-by: Jon Skeet <jonskeet@google.com>
This commit is contained in:
parent
cb5df1ea71
commit
426580248c
|
@ -0,0 +1,34 @@
|
|||
name: Push packages to NuGet
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-18.04
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
|
||||
steps:
|
||||
- name: Check out our repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Install the .NET Core 3.1 SDK for build and test
|
||||
- name: Setup .NET Core 3.1
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 3.1.x
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
dotnet build -c Release
|
||||
dotnet test -c Release
|
||||
mkdir nuget
|
||||
|
||||
- name: Push to NuGet
|
||||
run: |
|
||||
dotnet pack -c Release -o $PWD/nuget
|
||||
# For now, just display the NuGet packages we'd push in reality.
|
||||
ls nuget
|
Loading…
Reference in New Issue