Skip to content

Commit e96e634

Browse files
author
Taha Zahit Hakyemez
committed
Fix CI/CD: Use artifacts to pass package from Build to Deploy job
1 parent 86ea0ba commit e96e634

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.github/workflows/dotnet.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,27 @@ jobs:
2121
run: dotnet restore BiMap.sln
2222
- name: Build
2323
run: dotnet build --no-restore BiMap.sln --configuration Release
24+
- name: Pack
25+
run: dotnet pack BiMap.csproj --configuration Release --output nuget-packages
26+
- name: Upload NuGet Package
27+
uses: actions/upload-artifact@v3
28+
with:
29+
name: nuget-package
30+
path: nuget-packages/*.nupkg
2431

2532
deploy:
2633
runs-on: ubuntu-latest
2734
needs: build
2835
if: github.event_name == 'release'
2936
steps:
30-
- uses: actions/checkout@v3
37+
- name: Download NuGet Package
38+
uses: actions/download-artifact@v3
39+
with:
40+
name: nuget-package
41+
path: nuget-packages
3142
- name: Setup .NET
3243
uses: actions/setup-dotnet@v3
3344
with:
3445
dotnet-version: 10.0.x
35-
- name: Pack
36-
run: dotnet pack BiMap/BiMap.csproj --configuration Release --output nuget-packages
3746
- name: Publish to NuGet
3847
run: dotnet nuget push "nuget-packages/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

BiMap/BiMap.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<TargetFramework>netstandard2.0</TargetFramework>
66
<Authors>Taha Zahit Hakyemez</Authors>
77
<Description>Thread-safe, high-performance generic bidirectional map for .NET (BiMap). Supports O(1) lookups in both directions.</Description>
8-
<PackageReleaseNotes>Refactored project folder structure to standard layout. BiMap.sln is now at repo root.</PackageReleaseNotes>
8+
<PackageReleaseNotes>Fix deployment workflow: Use build artifacts to ensure packaging consistency.</PackageReleaseNotes>
99
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
10-
<Version>2.0.2</Version>
10+
<Version>2.0.3</Version>
1111
<RepositoryUrl>https://github.com/TahaZahit/BiMap</RepositoryUrl>
1212
<RepositoryType>git</RepositoryType>
1313
<PackageProjectUrl>https://github.com/TahaZahit/BiMap</PackageProjectUrl>

0 commit comments

Comments
 (0)