-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (26 loc) · 1004 Bytes
/
build-and-package.yml
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
name: Build, Test and Package
on:
push:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
include-prerelease: true
- name: Configure package sources
run: dotnet nuget add source --username mattkleiny --password ${{ secrets.ACCESS_TOKEN_GITHUB }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/mattkleiny/index.json"
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Pack
run: dotnet pack /p:Version=0.1.${{ github.run_number }} --output nuget-packages --configuration Release
- name: Push
run: dotnet nuget push **/*.nupkg --skip-duplicate --api-key ${{ github.token }} --source https://nuget.pkg.github.com/mattkleiny/index.json