Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Ahk2Exe
description: GitHub Action to compile AutoHotKey scripts using Ahk2Exe
description: GitHub Action to compile AutoHotKey v1 scripts using Ahk2Exe
author: nekocodeX

inputs:
Expand All @@ -26,7 +26,9 @@ runs:
shell: pwsh
run: |
$cwd = (Get-Item .).FullName;
Invoke-WebRequest "https://www.autohotkey.com/download/ahk.zip" -OutFile "$cwd\autohotkey.zip";
$latestV1Tag = (Invoke-RestMethod -Uri "https://api.github.com/repos/AutoHotkey/AutoHotkey/git/refs/tags" -Method Get) | Where-Object { $_.ref -match 'refs/tags/v1\.' } | Select-Object -Last 1
$ahkVersion = $latestV1Tag.ref -replace 'refs/tags/v', ''
Invoke-WebRequest "https://github.com/AutoHotkey/AutoHotkey/releases/download/v$ahkVersion/AutoHotkey_$ahkVersion.zip" -OutFile "$cwd\autohotkey.zip";
Expand-Archive -Path "$cwd\autohotkey.zip" -DestinationPath "$cwd\_autohotkey\" -Force;
Remove-Item -Path "$cwd\autohotkey.zip" -Force
Write-Output ("$cwd\_autohotkey\;" + "$cwd\_autohotkey\Compiler") | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Expand Down