Skip to content

Commit

Permalink
Create cd-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
w-ahmad authored Nov 24, 2023
1 parent 838407c commit 6b17e82
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/cd-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: cd-build

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup MSBuild.exe
uses: microsoft/[email protected]

- name: 'Get Version'
id: version
uses: battila7/get-version-action@v2

- name: Build
run: |
msbuild /restore /t:Build src/BlazorWebView.WinUI3/BlazorWebView.WinUI3.csproj /p:Configuration=Release /p:PackageVersion=${{ steps.version.outputs.version-without-v }}
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: NuGet Packages
path: artifacts/NuGet/Release

- name: Push to NuGet
run: |
dotnet nuget push artifacts\NuGet\Release\*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://nuget.org
dotnet nuget push artifacts\NuGet\Release\*.snupkg -k ${{ secrets.NUGET_API_KEY }} -s https://nuget.org

0 comments on commit 6b17e82

Please sign in to comment.