Skip to content

Build PS2EXE

Build PS2EXE #18

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.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
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$version = Get-Date -Format "yyyy.MM.dd.HHmm"
gh release create "v$version" `
--title "Release v$version" `
--notes "Automated release created by GitHub Actions" `
bin/gdl.exe