Skip to content

Commit 86ab064

Browse files
committed
Add action.yaml
アクションを追加
1 parent 9ef799d commit 86ab064

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

action.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Ahk2Exe
2+
description: GitHub Action to compile AutoHotKey scripts using Ahk2Exe
3+
author: nekocodeX
4+
5+
inputs:
6+
in:
7+
description: The path or file name of the AutoHotKey script to compile
8+
required: true
9+
out:
10+
description: The path or file name of the compiled executable (by default, an executable of the same name will be created in the path of the AutoHotKey script specified by the "in" parameter)
11+
required: false
12+
default: ''
13+
icon:
14+
description: The icon of the executable file is specified
15+
required: false
16+
default: ''
17+
18+
runs:
19+
using: composite
20+
steps:
21+
- name: Install Scoop
22+
shell: powershell
23+
run: |
24+
iwr -useb get.scoop.sh | iex
25+
scoop bucket add extras
26+
27+
- name: Add to environment variables
28+
shell: powershell
29+
run: Write-Output ('Path=' + $Env:SystemDrive + '\Windows\System32' + ';' + $Env:UserProfile + '\scoop\shims') >> $Env:GITHUB_ENV
30+
31+
- name: Install Git
32+
shell: powershell
33+
run: scoop install git
34+
35+
- name: Install AutoHotkey
36+
shell: powershell
37+
run: scoop install autohotkey
38+
39+
- name: Ahk2Exe
40+
shell: powershell
41+
run: |
42+
if (('${{inputs.in}}' -ne '') -and ('${{inputs.out}}' -ne '') -and ('${{inputs.icon}}' -ne '')) {
43+
ahk2exe /in '${{inputs.in}}' /out '${{inputs.out}}' /icon '${{inputs.icon}}'
44+
} elseif (('${{inputs.in}}' -ne '') -and ('${{inputs.out}}' -ne '')) {
45+
ahk2exe /in '${{inputs.in}}' /out '${{inputs.out}}'
46+
} elseif (('${{inputs.in}}' -ne '') -and ('${{inputs.icon}}' -ne '')) {
47+
ahk2exe /in '${{inputs.in}}' /icon '${{inputs.icon}}'
48+
} elseif ('${{inputs.in}}' -ne '') {
49+
ahk2exe /in '${{inputs.in}}'
50+
} else {
51+
throw 'There are no required parameters'
52+
}
53+
54+
branding:
55+
color: green
56+
icon: terminal

0 commit comments

Comments
 (0)