Merge branch 'master' of https://github.com/MartinKuschnik/WmiLight #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET Core | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.x | |
- 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 |