Skip to content

Commit

Permalink
Start publishing Shared project
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Feb 6, 2025
1 parent fd44dfd commit d59f22a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/PublishNuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish NuGet Package

on:
push:
branches: ['nightly'] # Only runs on pushes to the 'nightly' branch
branches: ['nightly', "publish_bugfixes"] # Only runs on pushes to the 'nightly' branch
workflow_dispatch: # Allows manual runs from the Actions tab

jobs:
Expand Down Expand Up @@ -34,15 +34,22 @@ jobs:
run: npm install
working-directory: src/Components

# Creates css file with current tailwind style
- name: Run Prebuild Script
run: npm run prebuild:net
working-directory: src/Components

- name: Build Project
- name: Build Components Project
run: dotnet build src/Components/src/Components.fsproj --configuration Release /p:GitTag=$GIT_TAG_LATEST

- name: Pack NuGet Package
- name: Build Shared Project
run: dotnet build src/Shared/Shared.fsproj --configuration Release /p:GitTag=$GIT_TAG_LATEST

- name: Pack Components NuGet Package
run: dotnet pack src/Components/src/Components.fsproj --configuration Release --output nupkgs /p:GitTag=$GIT_TAG_LATEST

- name: Pack Shared NuGet Package
run: dotnet pack src/Shared/Shared.fsproj --configuration Release --output nupkgs /p:GitTag=$GIT_TAG_LATEST

- name: Publish to NuGet
run: dotnet nuget push nupkgs/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
4 changes: 0 additions & 4 deletions src/Components/src/Components.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<Content Remove="C:\Users\Kevin\.nuget\packages\fable.core\4.3.0\contentFiles\any\netstandard2.0\CHANGELOG.md" />
</ItemGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\" />
<None Include="swateBundleStyle.css" Pack="true" PackagePath="fable/" />
Expand Down
21 changes: 21 additions & 0 deletions src/Shared/Shared.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<PackageId>Swate.Components.Core</PackageId>
<PackageVersion>$(GitTag)</PackageVersion>
<Authors>Kevin Frey</Authors>
<Description>Types for Swate.Components</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>F# fable rdm react fable-library fable-javascript</PackageTags>
<PackageProjectUrl>https://github.com/nfdi4plants/Swate</PackageProjectUrl>
<RepositoryUrl>https://github.com/nfdi4plants/Swate</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<Compile Include="Database.fs" />
<Compile Include="DTOs\AdvancedSearch.fs" />
Expand All @@ -12,4 +26,11 @@
<Compile Include="URLs.fs" />
<Compile Include="Shared.fs" />
</ItemGroup>

<ItemGroup>
<!-- Include all files that are compiled with this project -->
<Content Include="@(Compile)" Pack="true" PackagePath="fable/%(RelativeDir)%(Filename)%(Extension)" />
<!-- Include the project file itself as well -->
<Content Include="$(MSBuildThisFileFullPath)" Pack="true" PackagePath="fable/" />
</ItemGroup>
</Project>

0 comments on commit d59f22a

Please sign in to comment.