Skip to content

Commit d7d789d

Browse files
committed
feat: init project
1 parent c12db3b commit d7d789d

File tree

132 files changed

+16237
-2
lines changed

Some content is hidden

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

132 files changed

+16237
-2
lines changed

.editorconfig

Lines changed: 588 additions & 0 deletions
Large diffs are not rendered by default.

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Set default behavior to automatically normalize line endings
2+
* text=auto
3+
4+
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
5+
# in Windows via a file share from Linux, the scripts will work
6+
*.{cmd,[cC][mM][dD]} text eol=crlf
7+
*.{bat,[bB][aA][tT]} text eol=crlf
8+
9+
# Force bash scripts to always use LF line endings so that if a repo is accessed
10+
# in Unix via a file share from Windows, the scripts will work
11+
*.sh text eol=lf
12+
*.ps1 text eol=lf
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: "Post-Integration"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- "!stable"
8+
- "!release"
9+
10+
env:
11+
ATC_EMAIL: "atcnet.org@gmail.com"
12+
ATC_NAME: "Atc-Net"
13+
NUGET_REPO_URL: "https://nuget.pkg.github.com/atc-net/index.json"
14+
15+
jobs:
16+
merge-to-stable:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: 🛒 Checkout repository
20+
uses: actions/checkout@v5
21+
with:
22+
fetch-depth: 0
23+
token: ${{ secrets.PAT_WORKFLOWS }}
24+
25+
- name: ⚛️ Sets environment variables - branch-name
26+
uses: nelonoel/branch-name@v1.0.1
27+
28+
- name: ⚛️ Sets environment variables - Nerdbank.GitVersioning
29+
uses: dotnet/nbgv@master
30+
with:
31+
setAllVars: true
32+
33+
- name: ⚙️ Setup dotnet 10.0.x
34+
uses: actions/setup-dotnet@v5
35+
with:
36+
dotnet-version: "10.0.x"
37+
38+
- name: 📐 Ensure nuget.org added as package source on Windows
39+
run: dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org --configfile $env:APPDATA\NuGet\NuGet.Config
40+
continue-on-error: true
41+
42+
- name: 🔁 Restore packages
43+
run: dotnet restore
44+
45+
- name: 🛠️ Build
46+
run: dotnet build -c Release --no-restore /p:UseSourceLink=true
47+
48+
- name: 🧪 Run unit tests
49+
run: dotnet test -c Release --no-build
50+
51+
- name: ⏩ Merge to stable-branch
52+
run: |
53+
git config --local user.email ${{ env.ATC_EMAIL }}
54+
git config --local user.name ${{ env.ATC_NAME }}
55+
git checkout stable
56+
git merge --ff-only main
57+
git push origin stable
58+
59+
- name: 🗳️ Creating library package for pre-release
60+
run: dotnet pack -c Release --no-restore -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH_NAME /p:PublicRelease=true
61+
62+
- name: 📦 Push packages to GitHub Package Registry
63+
run: |
64+
cd ${GITHUB_WORKSPACE}/packages
65+
dotnet nuget push Atc.SourceGenerators.${{ env.NBGV_NuGetPackageVersion }}.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s ${{ env.NUGET_REPO_URL }} --skip-duplicate
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: "Pre-Integration"
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
10+
jobs:
11+
dotnet-build:
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
- name: 🛒 Checkout repository
18+
uses: actions/checkout@v5
19+
with:
20+
fetch-depth: 0
21+
22+
- name: ⚙️ Setup dotnet 10.0.x
23+
uses: actions/setup-dotnet@v5
24+
with:
25+
dotnet-version: '10.0.x'
26+
27+
- name: 🧹 Clean
28+
run: dotnet clean -c Release && dotnet nuget locals all --clear
29+
30+
- name: 🔁 Restore packages
31+
run: dotnet restore
32+
33+
- name: 🛠️ Building library in release mode
34+
run: dotnet build -c Release --no-restore
35+
36+
dotnet-test:
37+
runs-on: ubuntu-latest
38+
needs:
39+
- dotnet-build
40+
steps:
41+
- name: 🛒 Checkout repository
42+
uses: actions/checkout@v5
43+
with:
44+
fetch-depth: 0
45+
46+
- name: ⚙️ Setup .NET 10.0
47+
uses: actions/setup-dotnet@v5
48+
with:
49+
dotnet-version: '10.0.x'
50+
51+
- name: 🔁 Restore packages
52+
run: dotnet restore
53+
54+
- name: 🛠️ Build
55+
run: dotnet build -c Release --no-restore /p:UseSourceLink=true
56+
57+
- name: 🧪 Run unit tests
58+
run: dotnet test -c Release --no-build -- --filter-query "/[category!=integration]"

.github/workflows/release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "Release"
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
ATC_EMAIL: 'atcnet.org@gmail.com'
8+
ATC_NAME: 'Atc-Net'
9+
NUGET_REPO_URL: 'https://api.nuget.org/v3/index.json'
10+
11+
jobs:
12+
release:
13+
if: github.ref == 'refs/heads/stable'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: 🛒 Checkout repository
17+
uses: actions/checkout@v5
18+
with:
19+
fetch-depth: 0
20+
token: ${{ secrets.PAT_WORKFLOWS }}
21+
22+
- name: ⚛️ Sets environment variables - branch-name
23+
uses: nelonoel/branch-name@v1.0.1
24+
25+
- name: ⚛️ Sets environment variables - Nerdbank.GitVersioning
26+
uses: dotnet/nbgv@master
27+
with:
28+
setAllVars: true
29+
30+
- name: ⚙️ Setup dotnet 10.0.x
31+
uses: actions/setup-dotnet@v5
32+
with:
33+
dotnet-version: '10.0.x'
34+
35+
- name: 🧹 Clean
36+
run: dotnet clean -c Release && dotnet nuget locals all --clear
37+
38+
- name: 🔁 Restore packages
39+
run: dotnet restore
40+
41+
- name: 🛠️ Building library in release mode
42+
run: dotnet build -c Release --no-restore /p:UseSourceLink=true
43+
44+
- name: ⏩ Merge to release-branch
45+
run: |
46+
git config --local user.email ${{ env.ATC_EMAIL }}
47+
git config --local user.name ${{ env.ATC_NAME }}
48+
git checkout release
49+
git merge --ff-only stable
50+
git push origin release
51+
52+
- name: 🗳️ Creating library package for release
53+
run: dotnet pack -c Release --no-restore -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH_NAME /p:PublicRelease=true
54+
55+
- name: 📦 Push packages to NuGet
56+
run: |
57+
dotnet nuget push ${GITHUB_WORKSPACE}/packages/'Atc.SourceGenerators.'${NBGV_NuGetPackageVersion}'.nupkg' -k ${{ secrets.NUGET_KEY }} -s ${{ env.NUGET_REPO_URL }} --skip-duplicate --no-symbols

Atc.SourceGenerators.slnx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<Solution>
2+
<Folder Name="/docs/">
3+
<File Path="README.md" />
4+
</Folder>
5+
<Folder Name="/docs/generators/">
6+
<File Path="docs/generators/DependencyRegistration.md" />
7+
<File Path="docs/generators/EnumMapping.md" />
8+
<File Path="docs/generators/Mapping.md" />
9+
<File Path="docs/generators/OptionsBinding.md" />
10+
</Folder>
11+
<Folder Name="/docs/samples/">
12+
<File Path="docs/samples/DependencyRegistration.md" />
13+
<File Path="docs/samples/EnumMapping.md" />
14+
<File Path="docs/samples/Mapping.md" />
15+
<File Path="docs/samples/OptionsBinding.md" />
16+
<File Path="docs/samples/PetStoreApi.md" />
17+
</Folder>
18+
<Folder Name="/sample/">
19+
<Project Path="sample/Atc.SourceGenerators.DependencyRegistration.Domain/Atc.SourceGenerators.DependencyRegistration.Domain.csproj" />
20+
<Project Path="sample/Atc.SourceGenerators.DependencyRegistration/Atc.SourceGenerators.DependencyRegistration.csproj" />
21+
<Project Path="sample/Atc.SourceGenerators.EnumMapping/Atc.SourceGenerators.EnumMapping.csproj" />
22+
<Project Path="sample/Atc.SourceGenerators.Mapping.DataAccess/Atc.SourceGenerators.Mapping.DataAccess.csproj" />
23+
<Project Path="sample/Atc.SourceGenerators.Mapping.Domain/Atc.SourceGenerators.Mapping.Domain.csproj" />
24+
<Project Path="sample/Atc.SourceGenerators.Mapping/Atc.SourceGenerators.Mapping.csproj" />
25+
<Project Path="sample/Atc.SourceGenerators.OptionsBinding.Domain/Atc.SourceGenerators.OptionsBinding.Domain.csproj" />
26+
<Project Path="sample/Atc.SourceGenerators.OptionsBinding/Atc.SourceGenerators.OptionsBinding.csproj" />
27+
<Project Path="sample/PetStore.Api.Contract/PetStore.Api.Contract.csproj" />
28+
<Project Path="sample/PetStore.Api/PetStore.Api.csproj" />
29+
<Project Path="sample/PetStore.DataAccess/PetStore.DataAccess.csproj" />
30+
<Project Path="sample/PetStore.Domain/PetStore.Domain.csproj" />
31+
</Folder>
32+
<Folder Name="/src/">
33+
<Project Path="src/Atc.SourceGenerators.Annotations/Atc.SourceGenerators.Annotations.csproj" />
34+
<Project Path="src/Atc.SourceGenerators/Atc.SourceGenerators.csproj" />
35+
</Folder>
36+
<Folder Name="/tests/">
37+
<Project Path="test/Atc.SourceGenerators.Tests/Atc.SourceGenerators.Tests.csproj" />
38+
</Folder>
39+
</Solution>

0 commit comments

Comments
 (0)