Skip to content

Commit

Permalink
Adds build file
Browse files Browse the repository at this point in the history
  • Loading branch information
chintans committed Jan 3, 2024
1 parent 5bb187d commit cbf2d58
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: .NET to NuGet

on:
push:
branches: [ master ]
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.0.x' # Replace with your .NET version

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore

- name: Test
run: dotnet test --no-build

- name: Pack
run: dotnet pack --no-build --output nupkg

- name: Push to NuGet
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
21 changes: 21 additions & 0 deletions Promact.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>Promact.Core</Title>
<Description>Core package for Promact Utility implementation</Description>
<PackageProjectUrl>https://github.com/Promact/Core</PackageProjectUrl>
<PackageIcon>1267213_577149875682840_87122952_o_400x400.jpg</PackageIcon>
<RepositoryUrl>https://github.com/Promact/Core</RepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<None Include="C:\Users\Chintan Shah\OneDrive - Promact Infotech Pvt Ltd\Pictures\1267213_577149875682840_87122952_o_400x400.jpg">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<None Update="README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

</Project>

0 comments on commit cbf2d58

Please sign in to comment.