workflow suggestions / fixes #1
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: Build and Test on PR to master/develop | |
on: | |
pull_request: | |
branches: [ master, develop ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 6.* | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Prepare SNK | |
env: | |
NUGET_SIGNING_KEY: ${{ secrets.NUGET_SIGNING_KEY }} | |
run: echo "$NUGET_SIGNING_KEY" | base64 -d > RateLimiter/key.snk | |
- name: Build | |
run: dotnet build RateLimiter --configuration Release | |
- name: Test | |
run: dotnet test RateLimiterTests | |
- name: Publish NuGet Package | |
run: dotnet pack RateLimiter --configuration Release --output ./artifacts | |
# - name: Push NuGet package | |
# run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json |