Skip to content

Commit

Permalink
ci: update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdihadeli committed Nov 27, 2024
1 parent 7fd0161 commit 9d0bbfb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 5,102 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:

env:
GHC_SOURCE: ${{ vars.GHC_SOURCE }}
# FEED_SOURCE: https://api.nuget.org/v3/index.json
# FEED_API_KEY: ${{ secrets.FEED_API_KEY }}
FEED_SOURCE: https://api.nuget.org/v3/index.json
FEED_API_KEY: ${{ secrets.FEED_API_KEY }}
GHC_API_KEY: ${{ secrets.GHC_TOKEN }}
NuGetDirectory: nuget
AIAssistBuildOutput: src/AIAssist/bin/Release/net8.0
Expand Down Expand Up @@ -128,12 +128,7 @@ jobs:
mv ${{ env.DownloadOutput }}/bins/* ${{ env.AIAssistBuildOutput }}
mv ${{ env.DownloadOutput }}/grammars/bins/* ${{ env.AIAssistBuildOutput }}
rm -rf ${{ env.DownloadOutput }}
- name: List files
run: |
echo "Listing files in AIAssistBuildOutput:"
ls -R ${{ env.AIAssistBuildOutput }}
# https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-pack
- name: Pack NuGet Package Version ${{ steps.get_version.outputs.nuget_version }}
run: dotnet pack src/AIAssist/AIAssist.csproj -o ${{ env.NuGetDirectory }} -c Release --no-restore --no-build
Expand Down Expand Up @@ -185,10 +180,10 @@ jobs:
run: dotnet nuget push *.nupkg --skip-duplicate --api-key ${{ env.GHC_API_KEY }} --source ${{ env.GHC_SOURCE }}
if: github.event_name == 'push' && (startswith(github.ref, 'refs/heads') || startswith(github.ref, 'refs/tags'))

# # Publish all NuGet packages to NuGet.org
# # Use --skip-duplicate to prevent errors if a package with the same version already exists.
# # If you retry a failed workflow, already published packages will be skipped without error.
# # https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push
# - name: Publish NuGet Package Version ${{ steps.get_version.outputs.nuget_version }} to Nuget
# run: dotnet nuget push *.nupkg --skip-duplicate --source ${{ env.FEED_SOURCE }} --api-key ${{ env.FEED_API_KEY }}
# if: github.event_name == 'push' && startswith(github.ref, 'refs/tags')
# Publish all NuGet packages to NuGet.org
# Use --skip-duplicate to prevent errors if a package with the same version already exists.
# If you retry a failed workflow, already published packages will be skipped without error.
# https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push
- name: Publish NuGet Package Version ${{ steps.get_version.outputs.nuget_version }} to Nuget
run: dotnet nuget push *.nupkg --skip-duplicate --source ${{ env.FEED_SOURCE }} --api-key ${{ env.FEED_API_KEY }}
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags')
Loading

0 comments on commit 9d0bbfb

Please sign in to comment.