name: Build

on:
  push:
    branches: [ master ]

jobs:
  build-launcher:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v2

    - name: Set up Go
      uses: actions/setup-go@v2
      with:
        go-version: 1.16
 
    - name: Install Wails
      run: go get -u github.com/wailsapp/wails/cmd/wails@v1.16.3
    
    - name: Build Launcher
      run: |
        cd launcher
        wails build -d
        mv build/imperial-splendour-launcher.exe build/imperial-splendour-launcher_debug.exe
        wails build -p
        cd ..

    - name: Extract Artifacts
      uses: actions/upload-artifact@v2
      with:
        name: executables
        path: launcher/build/


  build-deactivator:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v2

    - name: Set up Go
      uses: actions/setup-go@v2
      with:
        go-version: 1.16
 
    - name: Build Deactivator
      run: |
        cd setup/deactivator
        go build -o ../deactivator.exe
        cd ../..

    - name: Commit updated Deactivator
      uses: EndBug/add-and-commit@v7
      with:
        add: 'setup/deactivator.exe'
        default_author: github_actions
        message: 'Build new Deactivator'
        pull_strategy: '--rebase'

name: Build

on:
  push:
    branches: [ master ]

jobs:
  build-launcher:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v2

    - name: Set up Go
      uses: actions/setup-go@v2
      with:
        go-version: 1.16
 
    - name: Install Wails
      run: go get -u github.com/wailsapp/wails/cmd/wails@v1.16.3
    
    - name: Build Launcher
      run: |
        cd launcher
        wails build -d
        mv build/imperial-splendour-launcher.exe build/imperial-splendour-launcher_debug.exe
        wails build -p
        cd ..

    - name: Extract Artifacts
      uses: actions/upload-artifact@v2
      with:
        name: executables
        path: launcher/build/


  build-deactivator:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v2

    - name: Set up Go
      uses: actions/setup-go@v2
      with:
        go-version: 1.16
 
    - name: Build Deactivator
      run: |
        cd setup/deactivator
        go build -o ../deactivator.exe
        cd ../..

    - name: Commit updated Deactivator
      uses: EndBug/add-and-commit@v7
      with:
        add: 'setup/deactivator.exe'
        default_author: github_actions
        message: 'Build new Deactivator'

Remove rebase from deactivator commit job
Remove rebase from deactivator commit job
