Skip to content

Commit ab25709

Browse files
committed
initial donet8 updated
0 parents  commit ab25709

File tree

77 files changed

+6985
-0
lines changed

Some content is hidden

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

77 files changed

+6985
-0
lines changed

.github/workflows/CICD.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish NuGet Package
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-and-publish:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
# Checkout the repository
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
15+
# Setup .NET
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v3
18+
with:
19+
dotnet-version: '8.0.x'
20+
21+
# Restore dependencies
22+
- name: Restore dependencies
23+
run: dotnet restore
24+
25+
# Step to extract the AssemblyVersion from the .csproj file
26+
- name: Extract Package Version
27+
id: get_version
28+
run: |
29+
version=$(grep -oPm1 "(?<=<Version>)[^<]+" $(find . -name "*.csproj"))
30+
echo "PACKAGE_VERSION=$version" >> $GITHUB_ENV
31+
echo "Package Version extracted: $version"
32+
33+
# Build the project
34+
- name: Build the project
35+
run: dotnet build --configuration Release
36+
37+
# Pack the NuGet package
38+
- name: Pack NuGet Package
39+
run: dotnet pack --configuration Release --output ./nupkg
40+
41+
# Publish the package to NuGet
42+
- name: Publish to NuGet
43+
env:
44+
NUGET_KEY: ${{ secrets.NUGET_KEY }}
45+
run: |
46+
dotnet nuget push ./nupkg/*.nupkg \
47+
--api-key $NUGET_KEY \
48+
--source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)