Skip to content

Commit 71ff8ba

Browse files
authored
Merge pull request #1 from Frederik91/actions
Create dotnet.yml
2 parents 5325dca + fce49d4 commit 71ff8ba

3 files changed

Lines changed: 61 additions & 5 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: .NET
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: windows-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v3
21+
with:
22+
dotnet-version: 7.0.x
23+
- name: Authenticate nuget feed
24+
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Frederik91/index.json"
25+
- name: Restore dependencies
26+
run: dotnet restore
27+
- name: Build
28+
run: dotnet build --no-restore
29+
- name: Test
30+
run: dotnet test --no-build --verbosity normal
31+
- name: Pack
32+
run: dotnet pack --configuration Release
33+
- name: Push
34+
run: dotnet nuget push "**/*.*.nupkg" --source "github"
Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<LangVersion>10</LangVersion>
7-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<LangVersion>10</LangVersion>
7+
</PropertyGroup>
8+
9+
<PropertyGroup>
10+
<OutputType>library</OutputType>
11+
<TargetFramework>netstandard2.0</TargetFramework>
12+
<PackageId>DependencyInjection.SourceGenerator.Contracts</PackageId>
13+
<Version>0.0.1</Version>
14+
<Authors>Frederik Tegnander</Authors>
15+
<Company>COWI</Company>
16+
<PackageDescription>Contains attriubutes to use with DependencyInjection.SourceGenerator</PackageDescription>
17+
<RepositoryUrl>https://github.com/Frederik91/DependencyInjection.SourceGenerator</RepositoryUrl>
18+
</PropertyGroup>
819

920
</Project>

DependencyInjection.SourceGenerator/DependencyInjection.SourceGenerator.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
<LangVersion>10</LangVersion>
88
</PropertyGroup>
99

10+
<PropertyGroup>
11+
<OutputType>library</OutputType>
12+
<TargetFramework>netstandard2.0</TargetFramework>
13+
<PackageId>DependencyInjection.SourceGenerator</PackageId>
14+
<Version>0.0.1</Version>
15+
<Authors>Frederik Tegnander</Authors>
16+
<Company>COWI</Company>
17+
<PackageDescription>Register services using attributes</PackageDescription>
18+
<RepositoryUrl>https://github.com/Frederik91/DependencyInjection.SourceGenerator</RepositoryUrl>
19+
</PropertyGroup>
20+
1021

1122
<ItemGroup>
1223
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" PrivateAssets="all" />

0 commit comments

Comments
 (0)