Skip to content

Commit

Permalink
Update dotnet.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKuschnik authored Dec 1, 2023
1 parent 70ab376 commit 7bdb408
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,34 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.3.1

- name: Install dependencies
run: dotnet restore

- name: Extract Private Key
run: |
echo "${{ secrets.PRIVATE_KEY }}" > WmiLight\private_key.base64
certutil -decode WmiLight\private_key.base64 WmiLight\private_key.snk
rm WmiLight\private_key.base64 -v
- name: Build
run: dotnet build --configuration Release --no-restore

- name: Cleanup Private Key
run: rm WmiLight\private_key.snk -v

- name: Pack with dotnet
if: github.event.action == 'published'
run: dotnet pack WmiLight\WmiLight.csproj --configuration Release --output nuget-packages --no-build

- name: Push with dotnet
if: github.event.action == 'published'
run: dotnet nuget push nuget-packages/ --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

0 comments on commit 7bdb408

Please sign in to comment.