Skip to content

Commit

Permalink
ci: dotnet pack release build (#344)
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Sawyer <[email protected]>
  • Loading branch information
jcsawyer authored Jan 15, 2025
1 parent 1b5a0a9 commit f994234
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
run: dotnet restore

- name: Build
run: dotnet build --no-restore
run: dotnet build -c Release --no-restore

- name: Test
run: dotnet test --no-build --logger GitHubActions
run: dotnet test -c Release --no-build --logger GitHubActions

packaging:
needs: build
Expand Down Expand Up @@ -75,11 +75,11 @@ jobs:

- name: Pack NuGet packages (CI versions)
if: startsWith(github.ref, 'refs/heads/')
run: dotnet pack --no-restore --version-suffix "ci.$(date -u +%Y%m%dT%H%M%S)+sha.${GITHUB_SHA:0:9}"
run: dotnet pack -c Release --no-restore --version-suffix "ci.$(date -u +%Y%m%dT%H%M%S)+sha.${GITHUB_SHA:0:9}"

- name: Pack NuGet packages (PR versions)
if: startsWith(github.ref, 'refs/pull/')
run: dotnet pack --no-restore --version-suffix "pr.$(date -u +%Y%m%dT%H%M%S)+sha.${GITHUB_SHA:0:9}"
run: dotnet pack -c Release --no-restore --version-suffix "pr.$(date -u +%Y%m%dT%H%M%S)+sha.${GITHUB_SHA:0:9}"

- name: Publish NuGet packages (base)
if: github.event.pull_request.head.repo.fork == false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: dotnet restore

- name: Pack
run: dotnet pack --no-restore
run: dotnet pack -c Release --no-restore

- name: Publish to Nuget
run: dotnet nuget push "src/**/*.nupkg" --api-key "${{ secrets.NUGET_TOKEN }}" --source https://api.nuget.org/v3/index.json
Expand Down

0 comments on commit f994234

Please sign in to comment.