Skip to content

Commit d73d3a4

Browse files
authored
Merge pull request #18 from alasconnect/convert-to-nuget-cpm
Convert to NuGet
2 parents b426995 + 68f9a7b commit d73d3a4

26 files changed

+206
-734
lines changed

.config/dotnet-tools.json

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
push:
3+
tags:
4+
- "giraffe-v[0-9]+.[0-9]+.[0-9]+"
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
14+
- name: Verify commit exists in origin/main
15+
run: |
16+
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
17+
git branch --remote --contains | grep origin/main
18+
19+
- name: Set VERSION variable from tag
20+
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
21+
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v1
24+
with:
25+
dotnet-version: 8.0.x
26+
27+
- name: Install .NET dependencies
28+
run: dotnet restore --locked-mode
29+
30+
- name: Build
31+
run: dotnet build --configuration Release /p:NuGetVersion=${VERSION}
32+
33+
- name: Test
34+
run: dotnet test --configuration Release /p:NuGetVersion=${VERSION} --no-build --verbosity normal
35+
36+
- name: Pack
37+
run: dotnet pack --configuration Release /p:NuGetVersion=${VERSION} /p:PackageVersion=${VERSION} --output .
38+
39+
- name: Push
40+
run: dotnet nuget push FSharp.Data.Validation.Giraffe.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${AMPERSAND_NUGET_KEY} --symbol-source https://symbols.nuget.org/download/symbols --symbol-api-key ${AMPERSAND_NUGET_KEY}
41+
42+
env:
43+
AMPERSAND_NUGET_KEY: ${{ secrets.AMPERSAND_NUGET_KEY }}

.github/workflows/release.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@ jobs:
2222
- name: Setup .NET
2323
uses: actions/setup-dotnet@v1
2424
with:
25-
dotnet-version: 6.0.x
26-
27-
- name: Restore .NET tools
28-
run: dotnet tool restore
25+
dotnet-version: 8.0.x
2926

3027
- name: Install .NET dependencies
31-
run: dotnet paket install
28+
run: dotnet restore --locked-mode
3229

3330
- name: Build
3431
run: dotnet build --configuration Release /p:NuGetVersion=${VERSION}
@@ -37,10 +34,10 @@ jobs:
3734
run: dotnet test --configuration Release /p:NuGetVersion=${VERSION} --no-build --verbosity normal
3835

3936
- name: Pack
40-
run: dotnet pack --configuration Release /p:NuGetVersion=${VERSION} /p:PackageVersion=${VERSION} --output .
37+
run: dotnet pack --configuration Release /p:NuGetVersion=${VERSION} /p:PackageVersion=${VERSION} --include-symbols --output .
4138

4239
- name: Push
43-
run: dotnet nuget push FSharp.Data.Validation.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${AMPERSAND_NUGET_KEY}
40+
run: dotnet nuget push FSharp.Data.Validation.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${AMPERSAND_NUGET_KEY} --symbol-source https://symbols.nuget.org/download/symbols --symbol-api-key ${AMPERSAND_NUGET_KEY}
4441

4542
env:
4643
AMPERSAND_NUGET_KEY: ${{ secrets.AMPERSAND_NUGET_KEY }}

.github/workflows/test.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ jobs:
1717
- name: Setup .NET
1818
uses: actions/setup-dotnet@v1
1919
with:
20-
dotnet-version: 6.0.x
21-
22-
- name: Restore .NET tools
23-
run: dotnet tool restore
20+
dotnet-version: 8.0.x
2421

2522
- name: Install .NET dependencies
26-
run: dotnet paket install
23+
run: dotnet restore --locked-mode
2724

2825
- name: Build .NET
2926
run: dotnet build

.paket/Paket.Restore.targets

Lines changed: 0 additions & 557 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Revision history for fsharp-data-validation
22

3+
## 1.0.1 - 03/14/2022
4+
5+
* Fix package dependency version ranges.
6+
37
## 1.0.0 - 03/14/2022
48

59
* First version. Released on an unsuspecting world.

paket.dependencies

Lines changed: 0 additions & 13 deletions
This file was deleted.

paket.lock

Lines changed: 0 additions & 70 deletions
This file was deleted.

samples/Directory.Build.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project>
2+
<PropertyGroup>
3+
<WarningsAsErrors>FS0025</WarningsAsErrors>
4+
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
5+
</PropertyGroup>
6+
</Project>
Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
5-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6+
<IsPackable>false</IsPackable>
7+
</PropertyGroup>
78

8-
<ItemGroup>
9-
<None Include="paket.references" />
10-
<Compile Include="Primitives.fs" />
11-
<Compile Include="ComplexTypes.fs" />
12-
</ItemGroup>
9+
<ItemGroup>
10+
<Compile Include="Primitives.fs" />
11+
<Compile Include="ComplexTypes.fs" />
12+
</ItemGroup>
1313

14-
<ItemGroup>
15-
<ProjectReference Include="..\..\src\FSharp.Data.Validation\FSharp.Data.Validation.fsproj" />
16-
</ItemGroup>
17-
<Import Project="..\..\.paket\Paket.Restore.targets" />
14+
<ItemGroup>
15+
<ProjectReference Include="..\..\src\FSharp.Data.Validation\FSharp.Data.Validation.fsproj" />
16+
</ItemGroup>
17+
18+
<ItemGroup>
19+
<PackageReference Update="FSharp.Core" Version="[6,)" />
20+
</ItemGroup>
1821

1922
</Project>

0 commit comments

Comments
 (0)