Build PS2EXE #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build PS2EXE | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT_TOKEN }} | |
fetch-depth: 0 | |
- name: Install PS2EXE | |
shell: powershell | |
run: | | |
Install-Module -Name ps2exe -Force -Scope CurrentUser | |
- name: Create bin directory | |
shell: powershell | |
run: | | |
New-Item -ItemType Directory -Force -Path bin | |
- name: Compile script | |
shell: powershell | |
run: | | |
Invoke-ps2exe -InputFile "run.ps1" -OutputFile "bin/gdl-pwsh.exe" | |
- name: Commit and push changes | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add bin/ | |
git commit -m "Auto-compile script to exe" || exit 0 | |
git push origin HEAD:master |