|
| 1 | +name: publish to NuGet |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + |
| 8 | +jobs: |
| 9 | + publish: |
| 10 | + |
| 11 | + runs-on: ubuntu-latest |
| 12 | + |
| 13 | + 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: <PackageVersion>(.*)<\/PackageVersion> |
| 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: <PackageVersion>(.*)<\/PackageVersion> |
| 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: <PackageVersion>(.*)<\/PackageVersion> |
| 48 | + NUGET_KEY: ${{secrets.NUGET_SECRET}} |
0 commit comments