Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to net8 and standardise repo #2

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
10 changes: 2 additions & 8 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,16 @@
"isRoot": true,
"tools": {
"paket": {
"version": "6.0.0-beta8",
"version": "8.0.3",
"commands": [
"paket"
]
},
"fable": {
"version": "3.1.12",
"version": "4.12.2",
"commands": [
"fable"
]
},
"fantomas-tool": {
"version": "4.4.0",
"commands": [
"fantomas"
]
}
}
}
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build

on:
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Check out
uses: actions/checkout@v4

- name: Restore tools
run: dotnet tool restore

- name: Build
run: dotnet build --configuration Release

- name: Restore demo tools
run: dotnet tool restore
working-directory: ./demo

- name: Build Demo
run: npm run build
working-directory: ./demo
71 changes: 46 additions & 25 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,53 @@
name: Nuget-Publish
name: Release Package

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [published]

jobs:
build:

publish:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
- name: Restore tools
run: dotnet tool restore
- name: Restore dependencies
run: dotnet restore
working-directory: ./fable/Feliz.ReactAwesomeSlider
- name: Build
run: dotnet build --configuration Release --no-restore
working-directory: ./fable/Feliz.ReactAwesomeSlider
- name: Publish
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: fable/Feliz.ReactAwesomeSlider/Feliz.ReactAwesomeSlider.fsproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Check out
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore tools
run: dotnet tool restore

# Build and Pack need to be separate operations due to error NU5026
- name: Build
run: dotnet build --configuration Release

- name: Pack
run: dotnet pack --no-build -p:PackageVersion=${{ github.ref_name }} -p:PackageReleaseNotes=${{ github.event.release.html_url }} --output .
working-directory: ./src/Feliz.ReactSpeedometer

- name: Publish
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
working-directory: ./src/Feliz.ReactSpeedometer

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Restore demo tools
run: dotnet tool restore
working-directory: ./demo

- name: Build Demo
run: npm run build
working-directory: ./demo

- name: Deploy pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./demo/dist
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ bin/
packages/
paket-files/
node_modules/
output/
release.cmd
release.sh
*.orig
Expand Down
1,054 changes: 560 additions & 494 deletions .paket/Paket.Restore.targets

Large diffs are not rendered by default.

79 changes: 0 additions & 79 deletions Build.fs

This file was deleted.

12 changes: 0 additions & 12 deletions Build.fsproj

This file was deleted.

104 changes: 0 additions & 104 deletions Helpers.fs

This file was deleted.

5 changes: 4 additions & 1 deletion src/Client/App.fs → demo/App.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ module App

open Elmish
open Elmish.React
open Fable.Core.JsInterop

#if DEBUG
open Elmish.Debug
open Elmish.HMR
#endif

importSideEffects "./styles/global.scss"

Program.mkProgram Index.init Index.update Index.view
#if DEBUG
|> Program.withConsoleTrace
#endif
|> Program.withReactSynchronous "elmish-app"
|> Program.withReactSynchronous "feliz-app"
#if DEBUG
|> Program.withDebugger
#endif
Expand Down
20 changes: 20 additions & 0 deletions demo/Demo.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<DefineConstants>FABLE_COMPILER</DefineConstants>
</PropertyGroup>
<ItemGroup>
<None Include="index.html" />
<None Include="paket.references" />
<Compile Include="Index.fs" />
<Compile Include="App.fs" />
<Content Include="vite.config.mts" />
<Content Include="package.json" />
<Content Include="styles\global.scss" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\Feliz.ReactAwesomeSlider\Feliz.ReactAwesomeSlider.fsproj" />
</ItemGroup>
<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
Loading