Skip to content

Commit

Permalink
OCC-140: Fix dotnet package missing image. (#292)
Browse files Browse the repository at this point in the history
* Add "Download NuGet icon" target.

* Add PackageIcon to all packaged projects.

* Include BeforeTargets="Pack".

* Don't try to push preview tags into NuGet.

* Detailed verbosity.

* Exclude preview from NuGet differently.

* Try BeforeTargets="Restore" instead.

* Copy local file instead, as download fails but only on GitHub runner.

* Revert "Detailed verbosity."

This reverts commit c0190ff.

* Not even Copy task works...
  • Loading branch information
sarahelsaig authored Apr 15, 2023
1 parent 36721c2 commit 27bbd1b
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
call-publish-workflow:
if: contains(github.ref, 'preview') == false
uses: Lombiq/GitHub-Actions/.github/workflows/publish-nuget.yml@dev
secrets:
API_KEY: ${{ secrets.NUGET_API_KEY }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ node_modules/
*.placeholder
/.editorconfig
.ps1-analyzer-stamp
OrchardCoreIcon.png
11 changes: 5 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
</PackageReference>
</ItemGroup>

<!-- Copying the Lombiq logo as an icon to all NuGet-published projects. -->
<Target Name="Download NuGet icon"
<!-- Copying the Orchard logo as an icon to all NuGet-published projects. -->
<Target Name="Copy NuGet icon"
AfterTargets="AfterResolveReferences"
Condition="'$(PackageIcon)' == 'OrchardCoreIcon.png' AND !Exists('$(ProjectDir)OrchardCoreIcon.png')">
<DownloadFile
SourceUrl="https://api.nuget.org/v3-flatcontainer/orchardcore/1.5.0/icon"
DestinationFolder="$(ProjectDir)"
DestinationFileName="OrchardCoreIcon.png" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)OrchardCoreIcon.png"
DestinationFiles="$(ProjectDir)OrchardCoreIcon.png"
SkipUnchangedFiles="true" />
</Target>
</Project>
Binary file added OrchardCoreIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 27bbd1b

Please sign in to comment.