New step to build .NET nupkg packages

This commit is contained in:
Anton Tayanovskyy 2021-11-18 12:26:42 -05:00
parent 293b73be51
commit e8c6f643a8
2 changed files with 42 additions and 1 deletions

View file

@ -18,6 +18,11 @@ on:
default: '14.x'
required: false
type: string
dotnet-version:
description: 'Version of the .NET toolchain for the build'
default: '3.1.x'
required: false
type: string
goreleaser-flags:
description: 'Command-line flags to pass to goreleaser'
default: '-p 3 -f .goreleaser.build.yml --snapshot --skip-validate'
@ -169,3 +174,39 @@ jobs:
with:
name: pulumi-node-sdk.tgz
path: sdk/nodejs/bin/*.tgz
build_dotnet_sdk:
name: Build Pulumi .NET SDK NuGet packages
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
ref: ${{ env.PR_COMMIT_SHA }}
- name: Fetch Tags
run: |
git fetch --quiet --prune --unshallow --tags
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.2.0
with:
repo: pulumi/pulumictl
- name: Set up DotNet ${{ inputs.dotnet-version }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ inputs.dotnet-version }}
- name: Compute current version to inform the NuGet package build
run: |
echo "DOTNET_VERSION=$(pulumictl get version --language dotnet)" >> $GITHUB_ENV
- name: Build the .NET SDK package
run: |
cd sdk/dotnet
dotnet build --configuration Release dotnet.sln /p:Version=$DOTNET_VERSION
- name: Pack the .NET SDK package
run: |
cd sdk/dotnet
dotnet pack --configuration Release --output nupkgs dotnet.sln /p:Version=$DOTNET_VERSION
- name: Upload the NuGet packages
uses: actions/upload-artifact@v2
with:
name: pulumi-nuget-packages
path: sdk/dotnet/nupkgs/*.nupkg

View file

@ -35,7 +35,7 @@ concurrency:
jobs:
build-pulumi-binaries:
uses: pulumi/pulumi/.github/workflows/build.yml@51473aeeda85822d476ecfa04d25b45c3d66480e
uses: pulumi/pulumi/.github/workflows/build.yml@0306cb1b34f3fddeca4e06ea580e3e59f1400b95
inspect-pulumi-binaries:
runs-on: ubuntu-latest