Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,21 @@ jobs:
- name: Build
run: dotnet build Build.csproj --no-restore -c Release

# note: NOT ".nupkgs" - actions/upload-artifact excludes hidden files by default, so a
# dot-directory uploads as an empty artifact (with only a warning). Caught by the first
# dry run of this workflow
- name: Collect packages
run: |
New-Item -ItemType Directory -Force -Path .nupkgs | Out-Null
Copy-Item src/Dapper.*/bin/Release/Dapper.*.nupkg .nupkgs/
Get-ChildItem .nupkgs/*.nupkg | ForEach-Object { Write-Output $_.Name }
New-Item -ItemType Directory -Force -Path nupkgs | Out-Null
Copy-Item src/Dapper.*/bin/Release/Dapper.*.nupkg nupkgs/
Get-ChildItem nupkgs/*.nupkg | ForEach-Object { Write-Output $_.Name }

# the packages survive as a run artifact even if the push fails
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: packages
path: .nupkgs/*.nupkg
path: nupkgs/*.nupkg

- name: NuGet login (OIDC to temp API key)
if: github.event_name == 'release'
Expand All @@ -98,4 +101,4 @@ jobs:

- name: Push to nuget.org
if: github.event_name == 'release'
run: dotnet nuget push .nupkgs/*.nupkg --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
run: dotnet nuget push nupkgs/*.nupkg --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"version": "1.1",
"versionHeightOffset": -3,
"versionHeightOffset": -4,
"assemblyVersion": "1.0.0.0",
"publicReleaseRefSpec": [
"^refs/heads/main$",
Expand Down
Loading