Skip to content

Commit

Permalink
Switched package publishing from GPR to NuGet
Browse files Browse the repository at this point in the history
The code changes involve modifying the GitHub Actions workflow. The packages were previously published to GitHub Package Registry (GPR), but now they are being published to NuGet instead. This change affects all projects in the workflow, including Stellar, Stellar.Maui, Stellar.Maui.PopUp, Stellar.Blazor, Stellar.Avalonia and Stellar.FluentValidation. The NUGET_AUTH_TOKEN is now also set in the environment where it's needed for each publish action.
  • Loading branch information
michaelstonis committed Oct 9, 2024
1 parent 4f5bd1b commit 7f45491
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
with:
dotnet-version: '8.x'
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_TOKEN}}

- uses: maxim-lobanov/setup-xcode@v1
with:
Expand All @@ -37,40 +35,52 @@ jobs:
run: dotnet build Stellar/Stellar.csproj
- name: Create the package
run: dotnet pack --configuration Release /p:AssemblyVersion=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} /p:Version=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} Stellar/Stellar.csproj
- name: Publish the package to GPR
run: dotnet nuget push Stellar/bin/Release/*.nupkg
- name: Publish the package to NuGet
run: dotnet nuget push Stellar/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}

- name: Build Stellar.Maui
run: dotnet build Stellar.Maui/Stellar.Maui.csproj
- name: Create the package
run: dotnet pack --configuration Release /p:AssemblyVersion=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} /p:Version=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} Stellar.Maui/Stellar.Maui.csproj
- name: Publish the package to GPR
run: dotnet nuget push Stellar.Maui/bin/Release/*.nupkg
- name: Publish the package to NuGet
run: dotnet nuget push Stellar.Maui/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}

- name: Build Stellar.Maui.PopUp
run: dotnet build Stellar.Maui.PopUp/Stellar.Maui.PopUp.csproj
- name: Create the package
run: dotnet pack --configuration Release /p:AssemblyVersion=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} /p:Version=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} Stellar.Maui.PopUp/Stellar.Maui.PopUp.csproj
- name: Publish the package to GPR
run: dotnet nuget push Stellar.Maui.PopUp/bin/Release/*.nupkg
- name: Publish the package to NuGet
run: dotnet nuget push Stellar.Maui.PopUp/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}

- name: Build Stellar.Blazor
run: dotnet build Stellar.Blazor/Stellar.Blazor.csproj
- name: Create the package
run: dotnet pack --configuration Release /p:AssemblyVersion=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} /p:Version=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} Stellar.Blazor/Stellar.Blazor.csproj
- name: Publish the package to GPR
run: dotnet nuget push Stellar.Blazor/bin/Release/*.nupkg
- name: Publish the package to NuGet
run: dotnet nuget push Stellar.Blazor/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}

- name: Build Stellar.Avalonia
run: dotnet build Stellar.Avalonia/Stellar.Avalonia.csproj
- name: Create the package
run: dotnet pack --configuration Release /p:AssemblyVersion=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} /p:Version=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} Stellar.Avalonia/Stellar.Avalonia.csproj
- name: Publish the package to GPR
run: dotnet nuget push Stellar.Avalonia/bin/Release/*.nupkg
- name: Publish the package to NuGet
run: dotnet nuget push Stellar.Avalonia/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}

- name: Build Stellar.FluentValidation
run: dotnet build Stellar.FluentValidation/Stellar.FluentValidation.csproj
- name: Create the package
run: dotnet pack --configuration Release /p:AssemblyVersion=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} /p:Version=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} Stellar.FluentValidation/Stellar.FluentValidation.csproj
- name: Publish the package to GPR
run: dotnet nuget push Stellar.FluentValidation/bin/Release/*.nupkg
- name: Publish the package to NuGet
run: dotnet nuget push Stellar.FluentValidation/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}

0 comments on commit 7f45491

Please sign in to comment.