@@ -19,18 +19,24 @@ jobs:
19
19
- name : Package the project
20
20
run : dotnet pack --no-build -c Release Snowflake/Snowflake.csproj -o .
21
21
- name : Publish Snowflake.CSharp to NuGet
22
- uses : rohith/publish-nuget@v2
23
- with :
24
- PROJECT_FILE_PATH : Snowflake/Snowflake.csproj
25
- NUGET_KEY : ${{secrets.NUGET_API_KEY}}
26
- PACKAGE_NAME : Snowflake.CSharp
22
+ run : |
23
+ PACKAGE_FILE=$(ls Snowflake.CSharp.*.nupkg | head -n 1)
24
+ if [ -z "$PACKAGE_FILE" ]; then
25
+ echo "No package file found."
26
+ exit 1
27
+ fi
28
+ echo "Pushing $PACKAGE_FILE to NuGet..."
29
+ dotnet nuget push "$PACKAGE_FILE" -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate || echo "Package already exists on NuGet."
27
30
- name : Build the Redis project
28
31
run : dotnet build -c Release Snowflake.Redis/Snowflake.Redis.csproj
29
32
- name : Package the Redis project
30
33
run : dotnet pack --no-build -c Release Snowflake.Redis/Snowflake.Redis.csproj -o .
31
34
- name : Publish Snowflake.Redis.CSharp to NuGet
32
- uses : rohith/publish-nuget@v2
33
- with :
34
- PROJECT_FILE_PATH : Snowflake.Redis/Snowflake.Redis.csproj
35
- NUGET_KEY : ${{secrets.NUGET_API_KEY}}
36
- PACKAGE_NAME : Snowflake.Redis.CSharp
35
+ run : |
36
+ PACKAGE_FILE=$(ls Snowflake.Redis.CSharp.*.nupkg | head -n 1)
37
+ if [ -z "$PACKAGE_FILE" ]; then
38
+ echo "No package file found."
39
+ exit 1
40
+ fi
41
+ echo "Pushing $PACKAGE_FILE to NuGet..."
42
+ dotnet nuget push "$PACKAGE_FILE" -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate || echo "Package already exists on NuGet."
0 commit comments