Skip to content

Commit d7437a9

Browse files
authored
Merge pull request #67 from jkone27/add-versionize
Add versionize (and CHANGELOG file)
2 parents 58410f9 + 2c94c23 commit d7437a9

File tree

19 files changed

+388
-326
lines changed

19 files changed

+388
-326
lines changed

.config/dotnet-tools.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"fantomas": {
6-
"version": "6.0.5",
6+
"version": "7.0.1",
77
"commands": [
88
"fantomas"
99
],
@@ -22,6 +22,20 @@
2222
"fsdocs"
2323
],
2424
"rollForward": false
25+
},
26+
"versionize": {
27+
"version": "2.3.1",
28+
"commands": [
29+
"versionize"
30+
],
31+
"rollForward": false
32+
},
33+
"dotnet-outdated-tool": {
34+
"version": "4.6.8",
35+
"commands": [
36+
"dotnet-outdated"
37+
],
38+
"rollForward": false
2539
}
2640
}
2741
}
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
name: .NET
1+
name: build-and-test
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- main
67
pull_request:
7-
branches: [ main ]
8+
branches:
9+
- main
810

911
jobs:
1012
build:
1113

1214
runs-on: ubuntu-latest
1315

1416
steps:
15-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1618
- name: Setup .NET
17-
uses: actions/setup-dotnet@v2
19+
uses: actions/setup-dotnet@v4
1820
with:
19-
dotnet-version: 6.0.x
21+
dotnet-version: 8.0.x
2022
source-url: https://api.nuget.org/v3/index.json
2123
env:
2224
NUGET_AUTH_TOKEN: ${{secrets.NUGET_KEY}}
@@ -27,8 +29,3 @@ jobs:
2729
run: dotnet build --no-restore
2830
- name: Test
2931
run: dotnet test --no-build --verbosity normal
30-
- name: Push Package
31-
# Main branch only
32-
if: github.ref == 'refs/heads/main'
33-
run: |
34-
dotnet nuget push **/*.nupkg --api-key ${{secrets.NUGET_KEY}} --skip-duplicate

.github/workflows/publish.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: 8.0.x
20+
source-url: https://api.nuget.org/v3/index.json
21+
env:
22+
NUGET_AUTH_TOKEN: ${{secrets.NUGET_KEY}}
23+
24+
- name: Setup Git
25+
uses: fregante/setup-git-user@v2
26+
27+
- name: Restore Dotnet Tools
28+
run: dotnet tool restore
29+
30+
- name: Run Versionize
31+
id: versionize
32+
run: |
33+
dotnet versionize
34+
continue-on-error: true
35+
36+
- name: No release required
37+
if: steps.versionize.outcome != 'success'
38+
run: echo "Skipping publishing. No release required."
39+
40+
- name: Pack
41+
if: steps.versionize.outcome == 'success'
42+
run: dotnet pack --output ./nupkgs --include-source --configuration Release --include-symbols
43+
44+
- name: Push Package
45+
if: steps.versionize.outcome == 'success'
46+
run: dotnet nuget push ./nupkgs/*.nupkg --api-key ${{secrets.NUGET_KEY}} --skip-duplicate
47+
48+
- name: Push changes to GitHub
49+
if: steps.versionize.outcome == 'success'
50+
uses: ad-m/github-push-action@master
51+
with:
52+
github_token: ${{ secrets.GITHUB_TOKEN }}
53+
branch: main
54+
tags: true

.husky/commit-msg

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
## husky task runner examples -------------------
5+
## Note : for local installation use 'dotnet' prefix. e.g. 'dotnet husky'
6+
7+
## run all tasks
8+
#husky run
9+
10+
### run all tasks with group: 'group-name'
11+
#husky run --group group-name
12+
13+
## run task with name: 'task-name'
14+
#husky run --name task-name
15+
16+
## pass hook arguments to task
17+
#husky run --args "$1" "$2"
18+
19+
## or put your custom commands -------------------
20+
#echo 'Husky.Net is awesome!'
21+
22+
npx --no -- commitlint --edit

ApiStub.FSharp.Stubbery/ApiStub.FSharp.Stubbery.fsproj

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

ApiStub.FSharp.Stubbery/Library.fs

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

ApiStub.FSharp.sln

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "test", "test\ApiStub.FSharp
99
EndProject
1010
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ApiStub.FSharp", "ApiStub.FSharp\ApiStub.FSharp.fsproj", "{F7EE43A1-C472-4B78-97AD-51B5435CC1BE}"
1111
EndProject
12-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ApiStub.FSharp.Stubbery", "ApiStub.FSharp.Stubbery\ApiStub.FSharp.Stubbery.fsproj", "{24264817-88F6-4E55-B1E2-18FD5BA8397D}"
13-
EndProject
1412
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D4C589F1-03B9-4E1D-BB6C-BFDFDD7AD169}"
1513
ProjectSection(SolutionItems) = preProject
1614
.gitignore = .gitignore

ApiStub.FSharp/ApiStub.FSharp.fsproj

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
44
<GenerateDocumentationFile>true</GenerateDocumentationFile>
55
<PackageId>ApiStub.FSharp</PackageId>
6-
<Version>1.2.1</Version>
6+
<Version>1.2.5</Version>
77
<Authors>jkone27</Authors>
88
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
99
<PackageLicenseExpression>MIT</PackageLicenseExpression>
@@ -28,15 +28,19 @@
2828
<Compile Include="Csharp.fs" />
2929
<Compile Include="BDD.fs" />
3030
</ItemGroup>
31-
<ItemGroup>
32-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.3">
33-
<GeneratePathProperty></GeneratePathProperty>
34-
</PackageReference>
31+
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
32+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.3" />
3533
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
36-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
34+
</ItemGroup>
35+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
36+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.15" />
37+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.4" />
38+
</ItemGroup>
39+
<ItemGroup>
40+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
3741
</ItemGroup>
3842
<ItemGroup>
39-
<PackageReference Update="FSharp.Core" Version="6.0.3" />
43+
<PackageReference Update="FSharp.Core" Version="9.0.100" />
4044
</ItemGroup>
4145
<Target Name="Husky" BeforeTargets="Restore;CollectPackageReferences" Condition="'$(HUSKY)' != 0">
4246
<Exec Command="dotnet tool restore" StandardOutputImportance="Low" StandardErrorImportance="High" />

ApiStub.FSharp/HttpResponseHelpers.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ open System.Text.Json
99

1010
module HttpResponseHelpers =
1111

12-
let inline R_OK contentType content =
12+
let inline R_OK (contentType: string) content =
1313
let response = new HttpResponseMessage(HttpStatusCode.OK)
1414
response.Content <- new StringContent(content, Text.Encoding.UTF8, contentType)
1515
response

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file. See [versionize](https://github.com/versionize/versionize) for commit guidelines.
4+
5+
<a name="1.2.5"></a>
6+
## [1.2.5](https://www.github.com/jkone27/fsharp-integration-tests/releases/tag/v1.2.5) (2025-05-10)
7+
8+
### Bug Fixes
9+
10+
* update packages ([0de4ac1](https://www.github.com/jkone27/fsharp-integration-tests/commit/0de4ac1593e0e266a5aed6d46f8b83d3f14cd1c0))
11+
12+
<a name="1.2.4"></a>
13+
## [1.2.4](https://www.github.com/jkone27/fsharp-integration-tests/releases/tag/v1.2.4) (2025-05-10)
14+
15+
### Bug Fixes
16+
17+
* move to net8 only lts ([49175f7](https://www.github.com/jkone27/fsharp-integration-tests/commit/49175f7fc2d5941408850e9bcc42b70828b73b9f))
18+
19+
<a name="1.2.3"></a>
20+
## [1.2.3](https://www.github.com/jkone27/fsharp-integration-tests/releases/tag/v1.2.3) (2025-05-10)
21+

0 commit comments

Comments
 (0)