Skip to content

Commit

Permalink
Merge branch 'main' of github.com:linksplatform/Data.Doublets.Sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
Konard committed Jan 26, 2025
2 parents f0711d8 + 8dddb3d commit 646d3c0
Showing 1 changed file with 44 additions and 12 deletions.
56 changes: 44 additions & 12 deletions .github/workflows/csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,52 @@ jobs:
- name: Test
run: |
dotnet test -c Release -f net8
pushNuGetPackageToGitHubPackageRegistry:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
pushNuGetPackageToGitHubPackageRegistry:
needs: test
runs-on: ubuntu-latest
steps:
# 1. Checkout the repository
- uses: actions/checkout@v3
with:
submodules: true

# 2. Setup .NET SDK
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
submodules: true
- uses: nuget/setup-nuget@v1
- name: Publish NuGet package to GitHub Package Registry
dotnet-version: '8.0.x' # Specify your required .NET version

# 3. Restore dependencies
- name: Restore dependencies
run: dotnet restore

# 4. Build the project
- name: Build
run: dotnet build --configuration Release --no-restore

# 5. Pack the project into a NuGet package
- name: Pack
run: dotnet pack --configuration Release --no-restore --output ./nupkgs

# 6. Add GitHub Package Registry as a NuGet source
- name: Add GitHub Package Registry as NuGet Source
run: |
dotnet nuget add source "https://nuget.pkg.github.com/linksplatform/index.json" \
--name "GitHub" \
--username "linksplatform" \
--password "${{ secrets.GITHUB_TOKEN }}" \
--store-password-in-clear-text
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# 7. Push the NuGet package to GitHub Package Registry
- name: Push NuGet Package to GitHub Package Registry
run: |
dotnet build -c Release
dotnet pack -c Release
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/linksplatform/index.json" -UserName linksplatform -Password ${{ secrets.GITHUB_TOKEN }}
nuget push **/*.nupkg -Source "GitHub" -SkipDuplicate
dotnet nuget push ./nupkgs/*.nupkg \
--source "GitHub" \
--api-key "${{ secrets.GITHUB_TOKEN }}"
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pusnToNuget:
runs-on: ubuntu-latest
needs: test
Expand Down

0 comments on commit 646d3c0

Please sign in to comment.