Skip to content
Merged
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: 10 additions & 0 deletions .github/workflows/azure.datatypechannels.asb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
run: dotnet fsi build.fsx -t ci
env:
servicePrincipalId: ${{ secrets.CLIENT_ID }}
- name: Upload NuGet package
uses: actions/upload-artifact@v4
with:
name: nuget
path: out/*.nupkg

release:
needs: build
Expand All @@ -50,6 +55,11 @@ jobs:
- uses: actions/setup-dotnet@v4.0.0
with:
global-json-file: global.json
- name: Download NuGet package
uses: actions/download-artifact@v4
with:
name: nuget
path: out
- name: Publish
env:
NUGET_REPO_KEY: "${{ secrets.NUGET_REPO_KEY }}"
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ packages/

.fake
.farmer
/output
temp/
output/
tmp/
out/
*.user
local.settings.json

Expand Down
11 changes: 7 additions & 4 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ Target.create "test" (fun _ ->
Target.create "package" (fun _ ->
let args = sprintf "/p:Version=%s --no-restore" ver.AsString
DotNet.pack (fun a -> a.WithCommon (fun c -> { c with CustomParams = Some args })) "."
!! "src/DatatypeChannels.ASB/bin/Release/*.nupkg"
|> Shell.copyFiles "out"
)

Target.create "publish" (fun _ ->
Expand All @@ -152,7 +154,7 @@ Target.create "publish" (fun _ ->
"DatatypeChannels.ASB" ver.AsString
(Environment.environVar "NUGET_REPO_URL")
(Environment.environVar "NUGET_REPO_KEY")
let result = exec ("src/DatatypeChannels.ASB/bin/Release") "nuget" args
let result = exec "out" "nuget" args
if (not result.OK) then failwithf "%A" result.Errors
)

Expand Down Expand Up @@ -226,16 +228,17 @@ Target.create "ci" ignore
==> "build"
==> "test"
==> "generateDocs"

"build"
==> "package"
==> "publish"

"releaseDocs"
<== ["test"; "generateDocs" ]

"release"
<== [ "initCI"; "publish" ]
<== [ "publish" ]

"ci"
<== [ "initCI"; "test" ]
<== [ "initCI"; "test"; "package" ]

Target.runOrDefaultWithArguments "test"
Loading