File tree Expand file tree Collapse file tree 2 files changed +0
-26
lines changed
Expand file tree Collapse file tree 2 files changed +0
-26
lines changed Original file line number Diff line number Diff line change 2121 - name : Pack ${{ inputs.project }} to local feed
2222 shell : bash
2323 run : dotnet pack ${{ inputs.project }}/${{ inputs.project }}.csproj -c Release -o ~/localfeed
24-
25- - name : Check package version conflict
26- shell : bash
27- run : |
28- PKG=${{ inputs.project }}
29- # Get all package search results (local + NuGet)
30- SEARCH_RESULTS=$(dotnet package search $PKG --exact-match --verbosity minimal | grep -E "^\|\s*$PKG\s*\|")
31- # Extract all versions into an array
32- VERSIONS=($(echo "$SEARCH_RESULTS" | awk -F'|' '{gsub(/ /,"",$3); print $3}'))
33- LOCAL_VERSION="${VERSIONS[0]}"
34- # Check if LOCAL_VERSION appears in any of the following versions
35- for ((i=1; i<${#VERSIONS[@]}; i++)); do
36- if [[ "${VERSIONS[$i]}" == "$LOCAL_VERSION" ]]; then
37- echo "Package $PKG version $LOCAL_VERSION already exists on nuget.org. Please increment the version."
38- exit 1
39- fi
40- done
41- echo "No version conflict for $PKG version $LOCAL_VERSION."
Original file line number Diff line number Diff line change 3333 with :
3434 project : LibUsbDfu
3535
36- - name : Push packages to NuGet.org
37- run : dotnet nuget push ~/localfeed/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
38-
39- - name : Push packages to GitHub Packages
40- run : |
41- dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/IntergatedCircuits/index.json"
42- dotnet nuget push ~/localfeed/*.nupkg --source "github" --api-key ${{ secrets.GITHUB_TOKEN }}
43-
4436 - name : Generate changelog
4537 id : changelog
4638 run : |
You can’t perform that action at this time.
0 commit comments