-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 794 Bytes
/
publish.yml
File metadata and controls
33 lines (30 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Publish to NuGet
on:
push:
branches:
- master # Default release branch
pull_request:
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
run: dotnet build
- name: test
run: dotnet test
publish:
# Only run this job on master
if: github.ref == 'refs/heads/master'
name: Publish to NuGet
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v2
# Publish
- name: publish on version change
uses: rohith/publish-nuget@v2
with:
PROJECT_FILE_PATH: XboxAPI.NET/XboxAPI.NET.csproj # Relative to repository root
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key