Skip to content

Commit fda2f58

Browse files
authored
Create build.yml
1 parent 449774e commit fda2f58

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

.github/workflows/build.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Build Binaries
2+
run-name: Build version ${{ inputs.version }}
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: The version of the library
8+
required: true
9+
default: 0.1.0
10+
type: string
11+
release:
12+
description: Create a release
13+
required: true
14+
default: false
15+
type: boolean
16+
permissions:
17+
contents: write
18+
actions: write
19+
checks: write
20+
jobs:
21+
build:
22+
runs-on: windows-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Cache tools
26+
uses: actions/cache@v4
27+
id: cache
28+
with:
29+
path: |
30+
autoit-v3-setup.exe
31+
SciTE4AutoIt3.exe
32+
C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper
33+
key: v3
34+
- name: Download tools
35+
if: steps.cache.outputs.cache-hit != 'true'
36+
run: |
37+
curl -sSfL https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe -o autoit-v3-setup.exe `
38+
-sSfL https://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe -o SciTE4AutoIt3.exe `
39+
-sSfLO https://www.autoitscript.com/autoit3/scite/download/Au3Stripper.zip
40+
Expand-Archive Au3Stripper.zip "${env:ProgramFiles(x86)}\AutoIt3\SciTE\Au3Stripper"
41+
- name: Install tools
42+
run: |
43+
Start-Process autoit-v3-setup.exe -ArgumentList /S -NoNewWindow -Wait
44+
Start-Process SciTE4AutoIt3.exe -ArgumentList /S -NoNewWindow -Wait
45+
- name: Compile
46+
run: |
47+
Start-Process "${env:ProgramFiles(x86)}\AutoIt3\AutoIt3.exe" "`"${env:ProgramFiles(x86)}\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3`" /NoStatus /prod /in LaunchAppContainer.au3" -NoNewWindow -Wait
48+
Start-Process "${env:ProgramFiles(x86)}\AutoIt3\AutoIt3.exe" "`"${env:ProgramFiles(x86)}\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3`" /NoStatus /prod /in LearningMode.au3" -NoNewWindow -Wait
49+
Start-Process "${env:ProgramFiles(x86)}\AutoIt3\AutoIt3.exe" "`"${env:ProgramFiles(x86)}\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3`" /NoStatus /prod /in SetAppContainerACL.au3" -NoNewWindow -Wait
50+
- uses: actions/upload-artifact@v4
51+
with:
52+
name: executable-files
53+
path: |
54+
LaunchAppContainer*.exe
55+
LearningMode*.exe
56+
SetAppContainerACL*.exe
57+
if-no-files-found: error
58+
- name: Zip package
59+
run: 7z a win32-appcontainer-tools.zip LaunchAppContainer*.exe LearningMode*.exe SetAppContainerACL*.exe
60+
7z a win32-appcontainer-tools.zip bin\
61+
7z a win32-appcontainer-tools.zip data\
62+
7z a win32-appcontainer-tools.zip LaunchAppContainer.ini
63+
- name: Rename archive with tag
64+
shell: pwsh
65+
run: |
66+
Copy-Item win32-appcontainer-tools.zip -Destination win32-appcontainer-tools-${{ inputs.version }}.zip
67+
- name: Create release
68+
uses: softprops/action-gh-release@v2
69+
if: ${{ inputs.release }}
70+
with:
71+
draft: true
72+
name: win32-appcontainer-tools ${{ inputs.version }}
73+
tag_name: ${{ inputs.version }}
74+
files: |
75+
win32-appcontainer-tools-${{ inputs.version }}.zip

0 commit comments

Comments
 (0)