diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f76b564..cb1ef078 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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' @@ -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 diff --git a/version.json b/version.json index d5f097f4..a89ee24f 100644 --- a/version.json +++ b/version.json @@ -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$",