Skip to content

Commit

Permalink
Use github workspace for working dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Benkevich committed Jan 27, 2021
1 parent da7b187 commit 6a78762
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/windows_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: '3.8'
- name: Install requirements
run: |
python -m pip install -r requirements.txt
Expand All @@ -30,6 +30,9 @@ jobs:
python setup.py bdist_msi
python scripts/windows/write_alcli_version.py
- name: Sign
env:
CERT: ${{ secrets.CERT }}
CERT_PWD: ${{ secrets.CERT_PWD }}
run: |
powershell scripts/windows/cleanup.ps1
powershell scripts/windows/verpatch_cli.ps1
Expand Down
18 changes: 9 additions & 9 deletions scripts/windows/alcli_windows_install.iss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define MyAppPublisher "Alert Logic, Inc."
#define MyAppURL "https://github.com/alertlogic/alcli"
#define MyAppExeName "alcli.exe"
#define WorkingDir "C:\Users\travis\build\alertlogic\alcli\"
#define WorkingDir "{%GITHUB_WORKSPACE}"

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
Expand All @@ -22,14 +22,14 @@ AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
AppCopyright=Copyright (C) 2020 Alert Logic, Inc.
SetupIconFile="{#WorkingDir}icons/alertlogic-win.ico"
WizardImageFile="{#WorkingDir}icons/alertlogic-modern-image.bmp"
WizardSmallImageFile="{#WorkingDir}icons/alertlogic-modern-small-image.bmp"
SetupIconFile="{%GITHUB_WORKSPACE}icons/alertlogic-win.ico"
WizardImageFile="{%GITHUB_WORKSPACE}icons/alertlogic-modern-image.bmp"
WizardSmallImageFile="{%GITHUB_WORKSPACE}icons/alertlogic-modern-small-image.bmp"
DefaultDirName={autopf}\{#MyAppDirectory}
DisableWelcomePage=no
DisableReadyPage=yes
DisableProgramGroupPage=yes
LicenseFile={#WorkingDir}LICENSE
LicenseFile={%GITHUB_WORKSPACE}LICENSE
; Uncomment the following line to run in non administrative install mode (install for current user only.)
PrivilegesRequired=admin
PrivilegesRequiredOverridesAllowed=commandline
Expand All @@ -50,10 +50,10 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "envPath"; Description: "Add to PATH variable"

[Files]
Source: "{#WorkingDir}build\exe.win-amd64-3.8\alcli.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#WorkingDir}build\exe.win-amd64-3.8\lib\*"; DestDir: "{app}\Lib"; Excludes: "{#WorkingDir}build\exe.win-amd64-3.8\lib\VCRUNTIME140.dll,{#WorkingDir}build\exe.win-amd64-3.8\lib\test\*,{#WorkingDir}build\exe.win-amd64-3.8\lib\*\test\*"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#WorkingDir}build\exe.win-amd64-3.8\python38.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#WorkingDir}build\exe.win-amd64-3.8\lib\VCRUNTIME140.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{%GITHUB_WORKSPACE}build\exe.win-amd64-3.8\alcli.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{%GITHUB_WORKSPACE}build\exe.win-amd64-3.8\lib\*"; DestDir: "{app}\Lib"; Excludes: "{%GITHUB_WORKSPACE}build\exe.win-amd64-3.8\lib\VCRUNTIME140.dll,{%GITHUB_WORKSPACE}build\exe.win-amd64-3.8\lib\test\*,{%GITHUB_WORKSPACE}build\exe.win-amd64-3.8\lib\*\test\*"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{%GITHUB_WORKSPACE}build\exe.win-amd64-3.8\python38.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{%GITHUB_WORKSPACE}build\exe.win-amd64-3.8\lib\VCRUNTIME140.dll"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Expand Down
4 changes: 2 additions & 2 deletions scripts/windows/load_sign_cert.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$ErrorActionPreference = "Stop"
$decoded = [System.Convert]::FromBase64CharArray($Env:cert, 0, $Env:cert.Length);
$decoded = [System.Convert]::FromBase64CharArray($Env:CERT, 0, $Env:CERT.Length);
$decoded | Set-Content cert.p12 -Encoding Byte;
$Password = ConvertTo-SecureString -String $Env:cert_pwd -AsPlainText -Force
$Password = ConvertTo-SecureString -String $Env:CERT_PWD -AsPlainText -Force
Import-PfxCertificate -FilePath cert.p12 -CertStoreLocation Cert:\LocalMachine\My -Password $Password

0 comments on commit 6a78762

Please sign in to comment.