forked from simplefx/Simple.OData
-
Notifications
You must be signed in to change notification settings - Fork 199
48 lines (35 loc) · 1.33 KB
/
ci.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
39
40
41
42
43
44
45
46
47
48
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: CI Build & Package
on:
workflow_dispatch:
push:
branches: [ "master" ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Get Current Time
id: build_date
run: |
$CurrentDateTime = Get-Date -Format "yyyyMMdd-HHmmss"
echo "::set-output name=date::$CurrentDateTime"
echo "$CurrentDateTime"
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Restore Dependencies
run: dotnet restore "src/Simple.OData.Client.sln"
- name: Build
run: dotnet build "src/Simple.OData.Client.sln" --no-restore --configuration Debug --verbosity minimal
- name: Test
run: dotnet test "src/Simple.OData.Client.sln" --no-build --configuration Debug --verbosity minimal
- name: Create NuGet Packages
run: dotnet pack src/Simple.OData.Client.sln --no-build --output packages /p:Configuration=debug /p:Version="${{ vars.CI_VERSION_MAJORMINOR }}-CI-${{ steps.build_date.outputs.date }}"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: packages