|
8 | 8 | jobs: |
9 | 9 | publish: |
10 | 10 |
|
| 11 | + env: |
| 12 | + KEY: '${{secrets.NUGET_SECRET}}' |
| 13 | + |
11 | 14 | runs-on: ubuntu-latest |
12 | 15 |
|
13 | 16 | steps: |
14 | | - - uses: actions/checkout@v2 |
15 | | - |
16 | | - # Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest |
17 | | - # Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest |
18 | | - # - name: Setup dotnet |
19 | | - # uses: actions/setup-dotnet@v1 |
20 | | - # with: |
21 | | - # dotnet-version: 3.1.100 |
22 | | - |
23 | | - # Publish |
24 | | - - name: publish FSharp.Data.GraphQL.Client on version change |
25 | | - uses: rohith/publish-nuget@v2 |
26 | | - with: |
27 | | - PROJECT_FILE_PATH: src/FSharp.Data.GraphQL.Client/FSharp.Data.GraphQL.Client.fsproj # Relative to repository root |
28 | | - VERSION_FILE_PATH: Directory.Build.targets |
29 | | - VERSION_REGEX: <Version>(.*)<\/Version> |
30 | | - # VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file |
31 | | - # VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group |
32 | | - # TAG_COMMIT: true # Flag to enable / disalge git tagging |
33 | | - # TAG_FORMAT: v* # Format of the git tag, [*] gets replaced with version |
34 | | - NUGET_KEY: ${{secrets.NUGET_SECRET}} |
35 | | - - name: publish FSharp.Data.GraphQL.Server on version change |
36 | | - uses: rohith/publish-nuget@v2 |
37 | | - with: |
38 | | - PROJECT_FILE_PATH: src/FSharp.Data.GraphQL.Server/FSharp.Data.GraphQL.Server.fsproj |
39 | | - VERSION_FILE_PATH: Directory.Build.targets |
40 | | - VERSION_REGEX: <Version>(.*)<\/Version> |
41 | | - NUGET_KEY: ${{secrets.NUGET_SECRET}} |
42 | | - - name: publish FSharp.Data.GraphQL.Server.Middleware on version change |
43 | | - uses: rohith/publish-nuget@v2 |
44 | | - with: |
45 | | - PROJECT_FILE_PATH: src/FSharp.Data.GraphQL.Server.Middleware/FSharp.Data.GraphQL.Server.Middleware.fsproj |
46 | | - VERSION_FILE_PATH: Directory.Build.targets |
47 | | - VERSION_REGEX: <Version>(.*)<\/Version> |
48 | | - NUGET_KEY: ${{secrets.NUGET_SECRET}} |
| 17 | + - uses: actions/checkout@v2 |
| 18 | + - name: Setup .NET Core |
| 19 | + uses: actions/setup-dotnet@v1 |
| 20 | + |
| 21 | + - name: Pack FSharp.Data.GraphQL.Shared project and push to NuGet |
| 22 | + if: startsWith(github.ref, 'refs/tags/release') |
| 23 | + run: | |
| 24 | + cd src/FSharp.Data.GraphQL.Shared |
| 25 | + dotnet pack --nologo --configuration Release /p:IsNuget=true -o ../../nuget |
| 26 | + dotnet nuget push ../../nuget/*Shared*.nupkg -k $KEY |
| 27 | +
|
| 28 | + - name: Pack FSharp.Data.GraphQL.Client project and push to NuGet |
| 29 | + if: startsWith(github.ref, 'refs/tags/release') |
| 30 | + run: | |
| 31 | + cd src/FSharp.Data.GraphQL.Client |
| 32 | + dotnet pack --nologo --configuration Release /p:IsNuget=true -o ../../nuget |
| 33 | + dotnet nuget push ../../nuget/*Client*.nupkg -k $KEY |
| 34 | +
|
| 35 | + - name: Pack FSharp.Data.GraphQL.Server project and push to NuGet |
| 36 | + if: startsWith(github.ref, 'refs/tags/release') |
| 37 | + run: | |
| 38 | + cd src/FSharp.Data.GraphQL.Server |
| 39 | + dotnet pack --nologo --configuration Release /p:IsNuget=true -o ../../nuget |
| 40 | + dotnet nuget push ../../nuget/*Server*.nupkg -k $KEY |
| 41 | +
|
| 42 | + - name: Pack FSharp.Data.GraphQL.Server.Middleware project and push to NuGet |
| 43 | + if: startsWith(github.ref, 'refs/tags/release') |
| 44 | + run: | |
| 45 | + cd src/FSharp.Data.GraphQL.Server.Middleware |
| 46 | + dotnet pack --nologo --configuration Release /p:IsNuget=true -o ../../nuget |
| 47 | + dotnet nuget push ../../nuget/*Server.Middleware*.nupkg -k $KEY |
0 commit comments