Skip to content

Commit 866fe58

Browse files
committed
Implemented launch profile in the Build project and switched publishing via it
1 parent ac37fc8 commit 866fe58

File tree

4 files changed

+22
-53
lines changed

4 files changed

+22
-53
lines changed

.github/workflows/publish_ci.yml

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -36,53 +36,8 @@ jobs:
3636
- name: Install local tools
3737
run: dotnet tool restore
3838

39-
- name: Run integration tests
40-
run: dotnet run --project build/Build.fsproj
41-
42-
- name: Pack FSharp.Data.GraphQL.Shared project
43-
run: |
44-
cd src/FSharp.Data.GraphQL.Shared
45-
dotnet pack --no-build --nologo --configuration Release /p:IsNuget=true -o ../../nuget
46-
- name: Publish FSharp.Data.GraphQL.Shared project to GitHub
47-
run: |
48-
dotnet nuget push nuget/*Shared*.nupkg -s "github" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
49-
50-
- name: Pack FSharp.Data.GraphQL.Client project
51-
run: |
52-
cd src/FSharp.Data.GraphQL.Client
53-
dotnet pack --no-build --nologo --configuration Release /p:IsNuget=true -o ../../nuget
54-
- name: Publish FSharp.Data.GraphQL.Client project to GitHub
55-
run: |
56-
dotnet nuget push nuget/*Client*.nupkg -s "github" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
57-
58-
- name: Pack FSharp.Data.GraphQL.Server project
59-
run: |
60-
cd src/FSharp.Data.GraphQL.Server
61-
dotnet pack --no-build --nologo --configuration Release /p:IsNuget=true -o ../../nuget
62-
- name: Publish FSharp.Data.GraphQL.Server project to GitHub
63-
run: |
64-
dotnet nuget push nuget/*Server*.nupkg -s "github" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
65-
66-
- name: Pack FSharp.Data.GraphQL.Server.Relay project
67-
run: |
68-
cd src/FSharp.Data.GraphQL.Server.Relay
69-
dotnet pack --no-build --nologo --configuration Release /p:IsNuget=true -o ../../nuget
70-
- name: Publish FSharp.Data.GraphQL.Server.Relay project to GitHub
71-
run: |
72-
dotnet nuget push nuget/*Server.Relay*.nupkg -s "github" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
73-
74-
- name: Pack FSharp.Data.GraphQL.Server.Middleware project
75-
run: |
76-
cd src/FSharp.Data.GraphQL.Server.Middleware
77-
dotnet pack --nologo --configuration Release /p:IsNuget=true -o ../../nuget
78-
- name: Publish FSharp.Data.GraphQL.Server.Middleware project to GitHub
79-
run: |
80-
dotnet nuget push nuget/*Server.Middleware*.nupkg -s "github" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
81-
82-
- name: Prepare the sample project to be packed as a project template
83-
run: |
84-
& "./Prepare template project for packing.ps1"
85-
shell: pwsh
39+
- name: Build and run integration tests
40+
run: dotnet run --project build/Build.fsproj --launch-profile PackAndPublish
8641

8742
- name: Pack FSharp.Data.GraphQL.ProjectTemplates template project
8843
run: |

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
run: dotnet tool restore
3333

3434
- name: Build and run integration tests
35-
run: dotnet run --project build/Build.fsproj
35+
run: dotnet run --project build/Build.fsproj --launch-profile BuildAndTest

build/Program.fs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ let pack id =
238238
{
239239
p with
240240
Common = { p.Common with Version = Some release.NugetVersion }
241+
NoLogo = true
241242
OutputPath = Some packageDir
243+
MSBuildParams = { p.MSBuildParams with Properties = [("IsNuget", "true")] }
242244
}
243245
.WithCommon
244246
DotNetCli.setVersion)
@@ -302,11 +304,16 @@ Target.create "PackAll" ignore
302304
|> ignore
303305

304306
"PackShared"
305-
==> "PackServer"
307+
==> "PublishShared"
306308
==> "PackClient"
309+
==> "PublishClient"
310+
==> "PackServer"
311+
==> "PublishServer"
307312
==> "PackMiddleware"
313+
==> "PublishMiddleware"
308314
==> "PackRelay"
309-
==> "PackAll"
315+
==> "PublishRelay"
316+
==> "Publish"
310317
|> ignore
311318

312319
Target.runOrDefaultWithArguments "All"
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
{
22
"profiles": {
3-
"Build": {
4-
"commandName": "Project"//,
5-
//"commandLineArgs": "--target Clean"
3+
"BuildAndTest": {
4+
"commandName": "Project"
5+
},
6+
"PackAndPublish": {
7+
"commandName": "Project",
8+
"commandLineArgs": "--target Publish"
9+
},
10+
"GenerateDocs": {
11+
"commandName": "Project",
12+
"commandLineArgs": "--target GenerateDocs"
613
}
714
}
815
}

0 commit comments

Comments
 (0)