-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (35 loc) · 1.34 KB
/
build.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
30
31
32
33
34
35
36
37
38
name: Build artifacts
# ==== NOTE: do not rename this yml file or the run_number will be reset ====
on:
push:
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use .NET Core 6.0 SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
source-url: https://nuget.pkg.github.com/Shane32/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Add graphql-dotnet nuget source
run: dotnet nuget add source https://nuget.pkg.github.com/graphql-dotnet/index.json -n graphqldotnet -u ${{ secrets.NUGET_PUBLIC_USER }} -p ${{ secrets.NUGET_PUBLIC_TOKEN }} --store-password-in-clear-text
- name: Install dependencies
run: dotnet restore
- name: Build solution [Release]
run: dotnet build --no-restore -c Release -p:VersionSuffix=$GITHUB_RUN_NUMBER
- name: Pack solution [Release]
run: dotnet pack --no-restore --no-build -c Release -p:VersionSuffix=$GITHUB_RUN_NUMBER -o out
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Nuget packages
path: |
out/*
- name: Publish Nuget packages to GitHub registry
run: dotnet nuget push "out/*" -k ${{secrets.GITHUB_TOKEN}}