name: Publish

on:
  push:
    branches:
      - master

jobs:
  release:
    name: Release
    if: "!contains(github.event.head_commit.message, 'skip-ci')"
    runs-on: windows-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Setup dotnet
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 3.1.200

      - name: Build
        shell: bash
        env:
            NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
            DOTNET_CLI_TELEMETRY_OPTOUT: true
        run: |
          # Restore .NET tools
          dotnet tool restore

          # Get the version number
          VERSION=$(dotnet minver -t v -v e)

          # Run the build script
          dotnet cake --target="Publish" --buildversion="$VERSION" 

name: Publish

on:
  push:
    branches:
      - master

jobs:
  release:
    name: Release
    if: "!contains(github.event.head_commit.message, 'skip-ci')"
    runs-on: windows-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Setup dotnet
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 3.1.200

      - name: Build
        shell: bash
        env:
            NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
            DOTNET_CLI_TELEMETRY_OPTOUT: true
        run: |
          # Restore .NET tools
          dotnet tool restore

          # Get the version number
          VERSION=$(dotnet minver -t v -v e -b preview)

          # Run the build script
          dotnet cake --target="Publish" --buildversion="$VERSION" 

Use 'preview' as build metadata
Use 'preview' as build metadata
