name: Windows Build
on: push
jobs:
  build:
    runs-on: windows-latest
    steps:
    - name: configure git line endings
      run: git config --global core.autocrlf false
    - uses: actions/checkout@v1
    - name: Setup Msys2 environment
      uses: msys2/setup-msys2@v2
      with:
        msystem: MSYS
    - name: Prepare mingw64 environment
      shell: msys2 {0}
      run: ./prepare_mingw64.sh
    - name: Build ffmpeg
      shell: msys2 {0}
      run: ./install_ffmpeg.sh
    - name: Build Livepeer
      shell: msys2 {0}
      run: ./ci_env.sh make livepeer livepeer_cli livepeer_bench livepeer_router
    - name: Upload build
      shell: msys2 {0}
      env: 
        CIRCLE_BRANCH: ${{ github.head_ref }}
        GCLOUD_KEY: ${{ secrets.GCLOUD_KEY }}
        GCLOUD_SECRET: ${{ secrets.GCLOUD_SECRET }}
        DISCORD_URL: ${{ secrets.DISCORD_URL }}
      run: ./upload_build.sh

name: Windows Build
on: push
jobs:
  build:
    runs-on: windows-latest
    steps:
    - name: configure git line endings
      run: git config --global core.autocrlf false
    - uses: actions/checkout@v1
    - name: Setup Msys2 environment
      uses: msys2/setup-msys2@v2
      with:
        msystem: MSYS
    - name: Prepare mingw64 environment
      shell: msys2 {0}
      run: ./prepare_mingw64.sh
    - name: Build ffmpeg
      shell: msys2 {0}
      run: ./install_ffmpeg.sh
    - name: Build Livepeer
      shell: msys2 {0}
      run: ./ci_env.sh make livepeer livepeer_cli livepeer_bench livepeer_router
    - name: Upload build
      shell: msys2 {0}
      env: 
        GITHUB_REF: ${{ github.ref }}
        GCLOUD_KEY: ${{ secrets.GCLOUD_KEY }}
        GCLOUD_SECRET: ${{ secrets.GCLOUD_SECRET }}
        DISCORD_URL: ${{ secrets.DISCORD_URL }}
      run: ./upload_build.sh

Use GITHUB_REF for Windows build
.github/workflows: Use GITHUB_REF for Windows build
