|
8 | 8 |
|
9 | 9 | jobs:
|
10 | 10 | build:
|
11 |
| - |
12 |
| - runs-on: windows-latest |
| 11 | + runs-on: ubuntu-latest |
13 | 12 |
|
14 | 13 | steps:
|
15 |
| - - uses: actions/checkout@v3 |
| 14 | + - uses: actions/checkout@v4 |
| 15 | + |
16 | 16 | - name: Setup .NET
|
17 |
| - uses: actions/setup-dotnet@v3 |
| 17 | + uses: actions/setup-dotnet@v4 |
18 | 18 | with:
|
19 |
| - dotnet-version: 8.0.x |
| 19 | + dotnet-version: 9.0.x |
| 20 | + |
20 | 21 | - name: Build & Restore
|
21 |
| - run: dotnet build --configuration Release src\ChristopherBriddock.SortingAlgorithms.sln -p:PackageVersion=${{ secrets.RELEASE_VERSION }} |
| 22 | + run: dotnet build --configuration Release src/ChristopherBriddock.SortingAlgorithms.sln -p:PackageVersion=${{ secrets.RELEASE_VERSION }} |
| 23 | + |
22 | 24 | - name: Test
|
23 |
| - run: dotnet test src\ChristopherBriddock.SortingAlgorithms.Tests\ChristopherBriddock.SortingAlgorithms.Tests.csproj |
| 25 | + run: dotnet test --configuration Release src/ChristopherBriddock.SortingAlgorithms.Tests/ChristopherBriddock.SortingAlgorithms.Tests.csproj |
| 26 | + |
24 | 27 | - name: Publish
|
25 |
| - run: dotnet publish src\ChristopherBriddock.SortingAlgorithms\ChristopherBriddock.SortingAlgorithms.csproj -c Release -p:PackageVersion=${{ secrets.RELEASE_VERSION }} |
| 28 | + run: dotnet publish src/ChristopherBriddock.SortingAlgorithms/ChristopherBriddock.SortingAlgorithms.csproj -c Release -p:PackageVersion=${{ secrets.RELEASE_VERSION }} |
| 29 | + |
26 | 30 | - name: Create the package
|
27 |
| - run: dotnet pack --configuration Release src\ChristopherBriddock.SortingAlgorithms\ChristopherBriddock.SortingAlgorithms.csproj -p:PackageVersion=${{ secrets.RELEASE_VERSION }} |
| 31 | + run: dotnet pack --configuration Release src/ChristopherBriddock.SortingAlgorithms/ChristopherBriddock.SortingAlgorithms.csproj -p:PackageVersion=${{ secrets.RELEASE_VERSION }} |
| 32 | + |
28 | 33 | - name: Upload a Build Artifact
|
29 |
| - uses: actions/upload-artifact@v3 |
| 34 | + uses: actions/upload-artifact@v4 |
30 | 35 | with:
|
31 | 36 | name: ChristopherBriddock.SortingAlgorithms
|
32 |
| - path: src/ChristopherBriddock.SortingAlgorithms\bin\Release\net8.0\publish |
| 37 | + path: src/ChristopherBriddock.SortingAlgorithms/bin/Release/net9.0/publish |
33 | 38 | if-no-files-found: error
|
34 |
| - - name: NuGet push |
35 |
| - run: dotnet nuget push "src\ChristopherBriddock.SortingAlgorithms\bin\Release\*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate |
| 39 | + |
| 40 | + - name: Push to GitHub Packages |
| 41 | + run: dotnet nuget push "src/ChristopherBriddock.SortingAlgorithms/bin/Release/*.nupkg" -k ${{ secrets.GITHUB_TOKEN }} -s "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --skip-duplicate |
| 42 | + env: |
| 43 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments