Merge pull request #11 from GarageGroup/feature/use-net8 #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
# Add NuGet Sources | |
- name: Create Local NuGet Directory | |
run: mkdir ~/nuget | |
- name: Add Local Nuget Source | |
run: dotnet nuget add source ~/nuget | |
- name: Add GGroupp NuGet Source | |
run: > | |
dotnet nuget add source ${{ vars.GG_NUGET_SOURCE_URL }} | |
-n garage | |
-u ${{ secrets.GG_NUGET_SOURCE_USER_NAME }} | |
-p ${{ secrets.GG_NUGET_SOURCE_USER_PASSWORD }} | |
--store-password-in-clear-text | |
# SocketsHandlerProvider.Abstractions | |
- name: Restore SocketsHandlerProvider.Abstractions | |
run: dotnet restore ./src/*/*/SocketsHandlerProvider.Abstractions.csproj | |
- name: Build SocketsHandlerProvider.Abstractions | |
run: dotnet build ./src/*/*/SocketsHandlerProvider.Abstractions.csproj --no-restore -c Release | |
- name: Pack SocketsHandlerProvider.Abstractions | |
run: dotnet pack ./src/*/*/SocketsHandlerProvider.Abstractions.csproj --no-restore -o ~/nuget -c Release | |
# SocketsHandlerProvider | |
- name: Restore SocketsHandlerProvider | |
run: dotnet restore ./src/*/*/SocketsHandlerProvider.csproj | |
- name: Build SocketsHandlerProvider | |
run: dotnet build ./src/*/*/SocketsHandlerProvider.csproj --no-restore -c Release | |
- name: Pack SocketsHandlerProvider | |
run: dotnet pack ./src/*/*/SocketsHandlerProvider.csproj --no-restore -o ~/nuget -c Release | |
# Polly | |
- name: Restore Polly | |
run: dotnet restore ./src/*/*/Polly.csproj | |
- name: Build Polly | |
run: dotnet build ./src/*/*/Polly.csproj --no-restore -c Release | |
- name: Pack Polly | |
run: dotnet pack ./src/*/*/Polly.csproj --no-restore -o ~/nuget -c Release | |
# Push | |
- name: Push Packages | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: > | |
dotnet nuget push "../../../nuget/*.nupkg" | |
-s ${{ vars.GG_NUGET_SOURCE_URL }} | |
-k ${{ secrets.GG_NUGET_SOURCE_USER_PASSWORD }} | |
--skip-duplicate |