Skip to content

replaced test vars with BMHS vars #7

replaced test vars with BMHS vars

replaced test vars with BMHS vars #7

Workflow file for this run

name: Convert PS1 to EXE
on:
push:
paths:
- '**.ps1'
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install PS2EXE
shell: pwsh
run: |
Write-Host "Setting PSGallery as Trusted"
Set-PSRepository PSGallery -InstallationPolicy Trusted
Write-Host "Installing ps2exe module"
Install-Module -Name ps2exe -Force -SkipPublisherCheck -Scope CurrentUser
- name: Convert PS1 to EXE
shell: pwsh
run: |
Write-Host "Importing ps2exe module"
Import-Module ps2exe
Write-Host "Converting PS1 files to EXE"
Get-ChildItem *.ps1 | ForEach-Object {
$exeName = "$($_.BaseName).exe"
Write-Host "Converting $($_.FullName) to $exeName"
Invoke-ps2exe -InputFile $_.FullName -OutputFile $exeName
}
- name: Upload EXE
uses: actions/upload-artifact@v2
with:
name: exe-files
path: ./*.exe