Skip to content

Publish MauiEx NuGet #7

Publish MauiEx NuGet

Publish MauiEx NuGet #7

name: Publish MauiEx NuGet
on:
workflow_dispatch:
jobs:
build:
runs-on: windows-2022
steps:
- name: Clone Repo
uses: actions/checkout@v1
- name: Setup Visual Studio Command Prompt
uses: microsoft/[email protected]
- name: Get certificate
id: cert_file
uses: timheuer/[email protected]
with:
fileName: 'certfile.pfx'
encodedString: ${{ secrets.BASE64_ENCODED_PFX }}
- name: Build
run: |
msbuild /restore /t:Build,Pack MauiEx\MauiEx.csproj /p:Configuration=Release /p:CertificatePath=${{ steps.cert_file.outputs.filePath }} /p:CertificatePassword=${{ secrets.PFX_PASSWORD }}
- name: Sign NuGet Package
run: |
nuget sign artifacts\Release\NuGet\*.nupkg -CertificatePath ${{ steps.cert_file.outputs.filePath }} -CertificatePassword ${{ secrets.PFX_PASSWORD }} -Timestamper http://timestamp.digicert.com -NonInteractive
nuget sign artifacts\Release\NuGet\*.snupkg -CertificatePath ${{ steps.cert_file.outputs.filePath }} -CertificatePassword ${{ secrets.PFX_PASSWORD }} -Timestamper http://timestamp.digicert.com -NonInteractive
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: NuGet Packages
path: artifacts/Release/NuGet
- name: Push to NuGet
run: |
dotnet nuget push artifacts\Release\NuGet\*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://nuget.org
dotnet nuget push artifacts\Release\NuGet\*.snupkg -k ${{ secrets.NUGET_API_KEY }} -s https://nuget.org