Skip to content

Commit 7688736

Browse files
committed
First commit.
0 parents  commit 7688736

75 files changed

Lines changed: 6038 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
*.sh eol=lf
6+
7+
###############################################################################
8+
# Set default behavior for command prompt diff.
9+
#
10+
# This is need for earlier builds of msysgit that does not have it on by
11+
# default for csharp files.
12+
# Note: This is only used by command line
13+
###############################################################################
14+
#*.cs diff=csharp
15+
16+
###############################################################################
17+
# Set the merge driver for project and solution files
18+
#
19+
# Merging from the command prompt will add diff markers to the files if there
20+
# are conflicts (Merging from VS is not affected by the settings below, in VS
21+
# the diff markers are never inserted). Diff markers may cause the following
22+
# file extensions to fail to load in VS. An alternative would be to treat
23+
# these files as binary and thus will always conflict and require user
24+
# intervention with every merge. To do so, just uncomment the entries below
25+
###############################################################################
26+
#*.sln merge=binary
27+
#*.csproj merge=binary
28+
#*.vbproj merge=binary
29+
#*.vcxproj merge=binary
30+
#*.vcproj merge=binary
31+
#*.dbproj merge=binary
32+
#*.fsproj merge=binary
33+
#*.lsproj merge=binary
34+
#*.wixproj merge=binary
35+
#*.modelproj merge=binary
36+
#*.sqlproj merge=binary
37+
#*.wwaproj merge=binary
38+
39+
###############################################################################
40+
# behavior for image files
41+
#
42+
# image files are treated as binary by default.
43+
###############################################################################
44+
#*.jpg binary
45+
#*.png binary
46+
#*.gif binary
47+
48+
###############################################################################
49+
# diff behavior for common document formats
50+
#
51+
# Convert binary document formats to text before diffing them. This feature
52+
# is only available from the command line. Turn it on by uncommenting the
53+
# entries below.
54+
###############################################################################
55+
#*.doc diff=astextplain
56+
#*.DOC diff=astextplain
57+
#*.docx diff=astextplain
58+
#*.DOCX diff=astextplain
59+
#*.dot diff=astextplain
60+
#*.DOT diff=astextplain
61+
#*.pdf diff=astextplain
62+
#*.PDF diff=astextplain
63+
#*.rtf diff=astextplain
64+
#*.RTF diff=astextplain
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Build and test
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest]
17+
# os: [ubuntu-latest, windows-latest, macos-latest]
18+
19+
20+
steps:
21+
- uses: actions/checkout@v5
22+
23+
- uses: actions/setup-dotnet@v5
24+
with:
25+
dotnet-version: |
26+
9.0.x
27+
8.0.x
28+
7.0.x
29+
6.0.x
30+
31+
- name: Force globaljson
32+
run: dotnet new globaljson --sdk-version "9.0.305" --force
33+
34+
- name: Cache ~/.nuget/packages
35+
uses: actions/cache@v4
36+
with:
37+
path: |
38+
.nuke/temp
39+
~/.nuget/packages
40+
!~/.nuget/packages/pekspro.DataAnnotationValuesExtractor
41+
!~/.nuget/packages/pekspro.DataAnnotationValuesExtractor.attributes
42+
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
43+
44+
- name: Restore dependencies
45+
run: dotnet restore ./Source/
46+
47+
- name: Build
48+
run: dotnet build ./Source/ --no-restore --configuration Debug
49+
50+
- name: Test
51+
run: dotnet test ./Source/ --no-build --configuration Debug --verbosity normal
52+
53+
- name: Pack DataAnnotationValuesExtractor
54+
run: dotnet pack ./Source/Library/Pekspro.DataAnnotationValuesExtractor/Pekspro.DataAnnotationValuesExtractor.csproj --verbosity normal --configuration Release --include-symbols /p:ContinuousIntegrationBuild=true
55+
56+
- name: Run sample in .NET 9
57+
run: dotnet run --project ./Source/Samples/DataAnnotationValuesExtractorSample/DataAnnotationValuesExtractorSample.csproj --framework net9.0 --configuration Release
58+
59+
- name: Run sample in .NET 8
60+
run: dotnet run --project ./Source/Samples/DataAnnotationValuesExtractorSample/DataAnnotationValuesExtractorSample.csproj --framework net8.0 --configuration Release
61+
62+
- name: Run sample in .NET 7
63+
run: dotnet run --project ./Source/Samples/DataAnnotationValuesExtractorSample/DataAnnotationValuesExtractorSample.csproj --framework net7.0 --configuration Release
64+
65+
- name: Run sample in .NET 6
66+
run: dotnet run --project ./Source/Samples/DataAnnotationValuesExtractorSample/DataAnnotationValuesExtractorSample.csproj --framework net6.0 --configuration Release
67+
68+
- uses: actions/upload-artifact@v4.6.2
69+
with:
70+
name: ${{ runner.os }}-Artifacts
71+
path: Artifacts
72+

.github/workflows/deploy.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
pushToNuget:
7+
description: 'Push to NuGet'
8+
default: '0'
9+
required: true
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
17+
- uses: actions/checkout@v5
18+
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v5
21+
with:
22+
dotnet-version: 9.0.x
23+
24+
- name: Restore dependencies
25+
run: dotnet restore ./Source/
26+
27+
- name: Build
28+
run: dotnet build ./Source/ --no-restore --configuration Release
29+
30+
- name: Pack DataAnnotationValuesExtractor
31+
run: dotnet pack ./Source/Library/Pekspro.DataAnnotationValuesExtractor/Pekspro.DataAnnotationValuesExtractor.csproj --verbosity normal --configuration Release --include-symbols /p:ContinuousIntegrationBuild=true
32+
33+
- name: Upload artifacts
34+
uses: actions/upload-artifact@v4.6.2
35+
with:
36+
name: NuGet-packages
37+
path: |
38+
./**/*.nupkg
39+
./**/*.snupkg
40+
41+
- name: Pushing to NuGet.org
42+
if: github.event.inputs.pushToNuget == '1'
43+
run: dotnet nuget push ./Artifacts/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}
44+

0 commit comments

Comments
 (0)