name: Test

on:
  push:
    branches: [ main ]

env:
  TEST_SCRIPT: 'test1.ps1'

jobs:
  build:
    runs-on: windows-latest
    env:
      solution: AmagnoVirtualPrinter.sln
      configuration: Release
    steps:
    - name: Checkout
      uses: actions/checkout@v3
      with:
        fetch-depth: 0
    # - name: File exists
    #   shell: pwsh
    #   run: Test-Path $Env:GITHUB_WORKSPACE/test.ps1 | Should -Be $true
    - name: Create msi from PowerShell Script
      shell: pwsh
      run: ${{env.TEST_SCRIPT}}
    - name: Upload artifacts
      uses: actions/upload-artifact@v2
      with:
        name: installer
        path: ./test.txt
    - name: Upload artifacts
      uses: actions/upload-artifact@v2
      with:
        name: files
        path: files/**/*
