Skip to content

Commit 9374ba2

Browse files
authored
Merge pull request fsprojects#142 from dsyme/docs
Update build/publish process
2 parents d501959 + 5072bff commit 9374ba2

11 files changed

Lines changed: 44 additions & 90 deletions

File tree

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"fsharp.formatting.commandtool": {
6-
"version": "11.1.0",
6+
"version": "11.4.1",
77
"commands": [
88
"fsdocs"
99
]

.github/workflows/publish.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Publish Docs
1+
name: Build and Publish
22
on:
33
push:
44
branches: [ master ]
@@ -7,17 +7,13 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10-
- name: Setup .NET
11-
uses: actions/setup-dotnet@v1
12-
with:
13-
dotnet-version: '3.1.x'
14-
- name: Setup .NET
10+
- name: Setup .NET
1511
uses: actions/setup-dotnet@v1
1612
with:
1713
dotnet-version: '5.0.202'
1814
- name: Install tools
1915
run: dotnet tool restore
20-
- name: Build and Test and Docs using FAKE
16+
- name: Build and Test and Docs using FAKE
2117
run: dotnet fake build
2218
- name: Deploy
2319
uses: peaceiris/actions-gh-pages@v3
@@ -26,3 +22,11 @@ jobs:
2622
publish_dir: ./output
2723
publish_branch: gh-pages
2824
force_orphan: true
25+
- name: Examine bin
26+
run: ls -r bin
27+
- name: Publish NuGets (if this version not published before)
28+
run: dotnet nuget push bin\FSharp.Control.AsyncSeq.*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_ORG_TOKEN_2021 }} --skip-duplicate
29+
30+
# NUGET_ORG_TOKEN_2021 is listed in "Repository secrets" in https://github.com/fsprojects/FSharp.Control.AsyncSeq/settings/secrets/actions
31+
# note, the nuget org token expires around 24 July 2022
32+

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,12 @@ xunit*.html
198198

199199
# exclude artifacts folder
200200
artifacts/
201+
bin/
201202

202203
# jest/fable directories
203204
tests/fable/dist/
204205
tests/fable/node_modules/
205206
output/
206207
tmp/
207208
.fsdocs/
208-
build.fsx.lock
209+
build.fsx.lock

RELEASE_NOTES.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
### 3.0.5
3+
* Update publishing
4+
15
### 3.0.4
26
* Restore netstandard2.0 (and thereby .NET Framework 4.6.1+) compatibility
37
* Update build env versions to current recommendations
@@ -7,7 +11,7 @@
711

812
* Include .fsi files into Fable package path [#118](https://github.com/fsprojects/FSharp.Control.AsyncSeq/pull/118)
913

10-
### 3.0.1
14+
### 3.0.1
1115

1216
* Move to only netstandard 2.1
1317

@@ -96,9 +100,9 @@
96100
* Rename toArray to toArrayAsync
97101
* Rename zipWithIndexAsync to mapiAsync
98102
* Rename interleave to interleaveChoice
99-
* Add interleave
100-
* Add mergeChoice
101-
* Fix performance of mergeAll
103+
* Add interleave
104+
* Add mergeChoice
105+
* Fix performance of mergeAll
102106
* Add init, initInfinite
103107
* Add initAsync, initInfiniteAsync, replicateInfinite
104108
* Add RequireQualifiedAccess to AsyncSeq
@@ -110,12 +114,12 @@
110114
* Cancellable AsyncSeq.toBlockingSeq
111115
* Fix AsyncSeq.scanAsync to also return first state
112116
* Add a signature file
113-
* AsyncSeq got extracted as separate project and is now a dependency - https://github.com/fsprojects/FSharpx.Async/pull/24
117+
* AsyncSeq got extracted as separate project and is now a dependency - https://github.com/fsprojects/FSharpx.Async/pull/24
114118

115119
### 1.13 - 27.03.2015
116120
* Renamed to FSharp.Control.AsyncSeq
117121
* Remove surface area
118-
* Hide Nil/Cons from representation of AsyncSeq
122+
* Hide Nil/Cons from representation of AsyncSeq
119123

120124
### 1.12.1 - 27.03.2015
121125
* Added Async.bindChoice, Async.ParallelIgnore, AsyncSeq.zipWithAsync, AsyncSeq.zappAsync, AsyncSeq.threadStateAsync, AsyncSeq.merge, AsyncSeq.traverseOptionAsync, AsyncSeq.traverseChoiceAsync

appveyor.yml

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

build.fsx

Lines changed: 16 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,11 @@ open Fake.Tools
2424
open System
2525
open System.IO
2626

27-
// --------------------------------------------------------------------------------------
28-
// START TODO: Provide project-specific details below
29-
// --------------------------------------------------------------------------------------
30-
3127
// The name of the project
3228
// (used by attributes in AssemblyInfo, name of a NuGet package and directory in 'src')
3329
let project = "src/FSharp.Control.AsyncSeq"
3430

35-
// File system information
31+
// File system information
3632
let solutionFile = "FSharp.Control.AsyncSeq.sln"
3733

3834
let summary = "Asynchronous sequences for F#"
@@ -45,8 +41,8 @@ let projectRepo = "https://github.com/fsprojects/FSharp.Control.AsyncSeq"
4541

4642
let configuration = DotNet.BuildConfiguration.fromEnvironVarOrDefault "configuration" DotNet.BuildConfiguration.Release
4743

48-
// Folder to deposit deploy artifacts
49-
let artifactsDir = __SOURCE_DIRECTORY__ @@ "artifacts"
44+
// Folder to deposit deploy bin
45+
let binDir = __SOURCE_DIRECTORY__ @@ "bin"
5046

5147
// Read additional information from the release notes document
5248
let release = ReleaseNotes.load "RELEASE_NOTES.md"
@@ -64,7 +60,7 @@ let versionPropsTemplate = $"\
6460

6561
Target.create "Clean" (fun _ ->
6662
DotNet.exec id "clean" "" |> ignore
67-
Shell.cleanDirs ["artifacts"; "temp"]
63+
Shell.cleanDirs ["bin"; "temp"]
6864
)
6965

7066
// Generate assembly info files with the right version & up-to-date information
@@ -97,7 +93,7 @@ Target.create "Build" (fun _ ->
9793
// --------------------------------------------------------------------------------------
9894
// Run the unit tests using test runner
9995

100-
Target.create "RunTests" (fun _ ->
96+
Target.create "Test" (fun _ ->
10197
solutionFile
10298
|> DotNet.test (fun opts ->
10399
{ opts with
@@ -112,13 +108,13 @@ Target.create "RunTests" (fun _ ->
112108
// --------------------------------------------------------------------------------------
113109
// Build a NuGet package
114110

115-
Target.create "NuGet" (fun _ ->
116-
111+
Target.create "Pack" (fun _ ->
112+
117113
File.WriteAllText("version.props",versionPropsTemplate)
118114
DotNet.pack (fun pack ->
119115
{ pack with
120-
OutputPath = Some artifactsDir
121-
Configuration = configuration
116+
OutputPath = Some binDir
117+
Configuration = configuration
122118
}) solutionFile
123119
)
124120

@@ -127,34 +123,7 @@ Target.create "NuGet" (fun _ ->
127123

128124
Target.create "GenerateDocs" (fun _ ->
129125
Shell.cleanDir ".fsdocs"
130-
DotNet.exec id "fsdocs" "build --clean --properties Configuration=Release" |> ignore
131-
)
132-
133-
// --------------------------------------------------------------------------------------
134-
// Release
135-
136-
Target.create "PublishNuget" (fun _ ->
137-
let source = "https://api.nuget.org/v3/index.json"
138-
let apikey = Environment.environVar "NUGET_KEY"
139-
for artifact in !! (artifactsDir + "/*nupkg") do
140-
if not (artifact.Contains(".symbols")) then
141-
let result = DotNet.exec id "nuget" (sprintf "push -s %s -k %s %s" source apikey artifact)
142-
if not result.OK then failwith "failed to push packages"
143-
)
144-
Target.create "ReleaseDocs" (fun _ ->
145-
Git.Repository.clone "" projectRepo "temp/gh-pages"
146-
Git.Branches.checkoutBranch "temp/gh-pages" "gh-pages"
147-
Shell.copyRecursive "output" "temp/gh-pages" true |> printfn "%A"
148-
Git.CommandHelper.runSimpleGitCommand "temp/gh-pages" "add ." |> printfn "%s"
149-
let cmd = sprintf """commit -a -m "Update generated documentation for version %s""" release.NugetVersion
150-
Git.CommandHelper.runSimpleGitCommand "temp/gh-pages" cmd |> printfn "%s"
151-
Git.Branches.push "temp/gh-pages"
152-
)
153-
154-
Target.create "Release" (fun _ ->
155-
Git.Branches.tag "" release.NugetVersion
156-
Git.Branches.pushTag "" projectRepo release.NugetVersion
157-
126+
DotNet.exec id "fsdocs" "build --clean --properties Configuration=Release --eval" |> ignore
158127
)
159128

160129
// --------------------------------------------------------------------------------------
@@ -164,16 +133,13 @@ Target.create "All" ignore
164133

165134
"Clean"
166135
==> "Build"
167-
==> "RunTests"
168-
==> "NuGet"
169-
==> "GenerateDocs"
136+
==> "Test"
137+
==> "Pack"
170138
==> "All"
171139

172-
"NuGet" ==> "PublishNuget"
173-
"GenerateDocs" ==> "ReleaseDocs"
174-
175-
"PublishNuget"
176-
==> "ReleaseDocs"
177-
==> "Release"
140+
"Clean"
141+
==> "Build"
142+
==> "GenerateDocs"
143+
==> "All"
178144

179145
Target.runOrDefault "All"

docs/_template.fsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
{{code}}

docs/_template.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
{{cells}}

paket.dependencies

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ nuget Microsoft.Bcl.AsyncInterfaces ~> 5.0.0 framework: netstandard2.0
99

1010
group Test
1111
source https://api.nuget.org/v3/index.json
12-
framework: netcoreapp3.1, net5.0
12+
framework: net5.0
1313
storage: none
1414

1515
generate_load_scripts: true
@@ -41,4 +41,4 @@ group Fake
4141
nuget Fake.DotNet.NuGet ~> 5.20.4
4242
nuget Fake.DotNet.MsBuild ~> 5.20.4
4343
nuget Fake.Tools.Git ~> 5.20.4
44-
nuget Fake.DotNet.Paket ~> 5.20.4
44+
nuget Fake.DotNet.Paket ~> 5.20.4

tests/FSharp.Control.AsyncSeq.Tests/FSharp.Control.AsyncSeq.Tests.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
3+
<TargetFrameworks>net5.0</TargetFrameworks>
44
<IsPackable>false</IsPackable>
55
</PropertyGroup>
66
<ItemGroup>

0 commit comments

Comments
 (0)