Skip to content

Commit

Permalink
fix release pipeline; Drop setup-nuget action; use ubuntu instead of …
Browse files Browse the repository at this point in the history
…windows; don't release as pre-release although we use System.Text v9 (#12)

* fix release pipeline

* ignore NU1504

maybe fixes
>  Error: C:\Program Files\dotnet\sdk\9.0.100-rc.2.24474.11\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(221,5): error NU5104: Warning As Error: A stable release of a package should not have a prerelease dependency. Either modify the version spec of dependency "System.Text.Json [9.0.0-rc.2.24473.5, )" or update the version field in the nuspec. [D:\a\malo-ident-net-models\malo-ident-net-models\MaLoIdentModels\MaLoIdentModels\MaLoIdentModels.csproj]

I want to release as real release, no pre-release.

* ignore NU1504 (#13)

maybe fixes
>  Error: C:\Program Files\dotnet\sdk\9.0.100-rc.2.24474.11\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(221,5): error NU5104: Warning As Error: A stable release of a package should not have a prerelease dependency. Either modify the version spec of dependency "System.Text.Json [9.0.0-rc.2.24473.5, )" or update the version field in the nuspec. [D:\a\malo-ident-net-models\malo-ident-net-models\MaLoIdentModels\MaLoIdentModels\MaLoIdentModels.csproj]

I want to release as real release, no pre-release.

Co-authored-by: Konstantin <[email protected]>

* Update release_nuget.yml

* don't pin system.text.json

Error: C:\Program Files\dotnet\sdk\9.0.100-rc.2.24474.11\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(221,5): error NU5104: Warning As Error: A stable release of a package should not have a prerelease dependency. Either modify the version spec of dependency "System.Text.Json [9.0.0-rc.2.24473.5, )" or update the version field in the nuspec. [D:\a\malo-ident-net-models\malo-ident-net-models\MaLoIdentModels\MaLoIdentModels\MaLoIdentModels.csproj]

* www

https://gitkraken.dev/link/drafts/23475fc5-edc2-4da5-9a67-54fd1fef15d1?type=suggested_pr_change&prEntityId=WyJnaXRodWIiLCJwciIsIjEiLCIiLCJQUl9rd0RPTTNWcm1jNS1QMWpCIl0=

* xxx

Run dotnet nuget push ./bin/Release/*.nupkg --api-key $NUGET_ORG_PUSH_TOKEN --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
  dotnet nuget push ./bin/Release/*.nupkg --api-key $NUGET_ORG_PUSH_TOKEN --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    ACTIONS_ALLOW_UNSECURE_COMMANDS: true
    DOTNET_ROOT: C:\Program Files\dotnet
    GIT_TAG_NAME: 0.2.6
    NUGET_ORG_PUSH_TOKEN: ***
error: Source parameter was not specified.

* aaaaaaa

* switch back to ubuntu-latest

* prettier

---------

Co-authored-by: Konstantin <[email protected]>
  • Loading branch information
hf-kklein and Konstantin authored Oct 10, 2024
1 parent c6f0c2d commit 5e36f02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/release_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
push_release:
needs: run_tests
if: startsWith(github.ref, 'refs/tags/v')
runs-on: windows-latest
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
steps:
Expand All @@ -41,12 +41,9 @@ jobs:
- name: Create Package MaLoIdentModels (dotnet pack)
working-directory: "MaLoIdentModels/MaLoIdentModels"
run: dotnet pack MaLoIdentModels.csproj --configuration Release -p:PackageVersion="${{ steps.tagTBC.outputs.tag }}"
- name: Setup Nuget.exe
uses: warrenbuckley/Setup-Nuget@v1
- name: Nuget push MaLoIdentModels
working-directory: "MaLoIdentModels/MaLoIdentModels"
# token: https://github.com/Hochfrequenz/MaLoIdentModels/settings/secrets/actions/NUGET_ORG_PUSH_TOKEN
# expires 2025-09-27; token is owned by konstantin as of now.
run: |
nuget setApiKey ${{ secrets.NUGET_ORG_PUSH_TOKEN }}
nuget push .\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -NoSymbols
dotnet nuget push ./bin/Release/*.nupkg --api-key ${{ secrets.NUGET_ORG_PUSH_TOKEN }} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
4 changes: 3 additions & 1 deletion MaLoIdentModels/MaLoIdentModels/MaLoIdentModels.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>1701;1702;NU5104</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Text.Json" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="System.Text.Json" Version="[9.0.0-rc.2.24473.5, )" />
<!-- we need System.Text.Json >= 9 to use the JsonStringEnumMemberNameAttribute -->
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 5e36f02

Please sign in to comment.