Skip to content

Commit

Permalink
ci: Update GitHub Actions workflow
Browse files Browse the repository at this point in the history
- Changed the workflow name from ".NET Core" to ".NET Core - Build and Test".
- Updated `actions/checkout` action from version 2 to version 4.
- Updated `actions/setup-dotnet` action from version 1 to version 4.
- Commented out the `Publish` step, which included adding a NuGet source, packing projects, and pushing the packages to GitHub and NuGet.
  • Loading branch information
VaclavElias committed Dec 29, 2024
1 parent ec5082f commit f5428cf
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: .NET Core
name: .NET Core - Build and Test

on: [push, pull_request]

Expand All @@ -8,8 +8,8 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x'
include-prerelease: true
Expand All @@ -23,11 +23,11 @@ jobs:
dotnet build Demos --configuration Release --no-restore
- name: Test
run: dotnet test DemoTests -c Release --verbosity normal
- name: Publish
if: github.event_name != 'pull_request'
run: |
dotnet nuget add source "https://nuget.pkg.github.com/bepu/index.json" --name "github" --username "rossnordby" --password "${{secrets.GITHUB_TOKEN}}"
dotnet pack "BepuPhysics" -c Release
dotnet pack "BepuUtilities" -c Release
dotnet nuget push "**/*.nupkg" -s "github" -k "${{secrets.GITHUB_TOKEN}}" --skip-duplicate
dotnet nuget push "**/*.nupkg" -s "https://api.nuget.org/v3/index.json" -k "${{secrets.NUGET_KEY}}" --skip-duplicate
# - name: Publish
# if: github.event_name != 'pull_request'
# run: |
# dotnet nuget add source "https://nuget.pkg.github.com/bepu/index.json" --name "github" --username "rossnordby" --password "${{secrets.GITHUB_TOKEN}}"
# dotnet pack "BepuPhysics" -c Release
# dotnet pack "BepuUtilities" -c Release
# dotnet nuget push "**/*.nupkg" -s "github" -k "${{secrets.GITHUB_TOKEN}}" --skip-duplicate
# dotnet nuget push "**/*.nupkg" -s "https://api.nuget.org/v3/index.json" -k "${{secrets.NUGET_KEY}}" --skip-duplicate

0 comments on commit f5428cf

Please sign in to comment.