-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 1.05 KB
/
Copy pathpull-request.yml
File metadata and controls
35 lines (29 loc) · 1.05 KB
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
name: Pull Request Build
on:
pull_request:
types: [assigned, opened, synchronize, reopened]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.x
- name: Build
run: |
$VERSION = Get-Content 'src\version' -TotalCount 1
$PACKAGE_VERSION = "$VERSION-build.${{ github.run_number }}"
Write-Output "Generating Package with version: $PACKAGE_VERSION ..."
# $DESCRIPTION = Get-Content 'README.MD'
# $DESCRIPTION = $DESCRIPTION -join '\n\r'
dotnet build src/GitHub.sln -p:Configuration=Release -o dist -p:Version=$VERSION -p:PackageVersion=$PACKAGE_VERSION
dotnet pack src/GitHub.sln -p:Configuration=Release -o dist -p:Version=$VERSION -p:PackageVersion=$PACKAGE_VERSION
- name: Upload artifact
if: "!startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v2
with:
name: nuget
path: dist/*.nupkg