-
-
Notifications
You must be signed in to change notification settings - Fork 111
76 lines (73 loc) · 3.43 KB
/
exe-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Build exe installer for windows for prometheus-push only version
on:
push:
paths-ignore:
- 'docs_src/**'
- 'README.md'
- 'CITATION'
- 'book.toml'
- 'CONTRIBUTING.md'
- '*.md'
- 'oranda.json'
tags: [ 'v*.*.*', 'dev*.*.*' ]
branches: [ '336-proper-handling-of-windows-service-management' ]
env:
WRD_VERSION: v0.0.4
WRD_BASE_URL: https://github.com/hubblo-org/windows-rapl-driver/releases/download
jobs:
build_exe_win1011:
name: Build exe installer for windows 10/11/server 2016/server 2019/server 2022
runs-on: "windows-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Innosoft
run: |
$url = "https://jrsoftware.org/download.php/is.exe"
$dest = "is.exe"
Invoke-WebRequest -Uri $url -OutFile $dest
ls
& "D:\a\scaphandre\scaphandre\$dest" /verysilent /suppressmsgbox
ls "C:\Program Files (x86)\Inno Setup 6\"
- name: Get windows-rapl-driver
shell: pwsh
run: |
$dest = "DriverLoader.exe"
$url = "${{ env.WRD_BASE_URL }}/${{ env.WRD_VERSION }}/DriverLoader.exe"
Invoke-WebRequest -Uri ($url -replace '"', "") -OutFile $dest
$dest = "ScaphandreDrv.cat"
$url = "${{ env.WRD_BASE_URL }}/${{ env.WRD_VERSION }}/ScaphandreDrv.cat"
Invoke-WebRequest -Uri ($url -replace '"', "") -OutFile $dest
$dest = "ScaphandreDrv.sys"
$url = "${{ env.WRD_BASE_URL }}/${{ env.WRD_VERSION }}/ScaphandreDrv.sys"
Invoke-WebRequest -Uri ($url -replace '"', "") -OutFile $dest
$dest = "ScaphandreDrv.inf"
$url = "${{ env.WRD_BASE_URL }}/${{ env.WRD_VERSION }}/ScaphandreDrv.inf"
Invoke-WebRequest -Uri ($url -replace '"', "") -OutFile $dest
- name: Install Rustup
uses: crazy-max/ghaction-chocolatey@v2
with:
args: install rustup.install --ignore-checksums
- name: Install Rust toolchain
run: |
rustup toolchain install stable-x86_64-pc-windows-msvc
- name: Build Scaphandre
run: |
cargo build --release --no-default-features --features "prometheus json"
- name: Build package
run: |
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" packaging/windows/installer.iss
- name: Upload artifact #Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
run: |
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
Install-Module -Confirm:$False -Name AWS.Tools.Installer
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
Import-Module AWS.Tools.Installer
Install-AWSToolsModule AWS.Tools.EC2,AWS.Tools.S3 -CleanUp -Confirm:$False -AllowClobber
Set-AWSCredential -AccessKey ${{ secrets.S3_ACCESS_KEY_ID }} -SecretKey ${{ secrets.S3_SECRET_ACCESS_KEY }} -StoreAs default
mv packaging/windows/Output/scaphandre_installer.exe scaphandre_${{ github.ref_name }}_installer.exe
$clientconfig=@{
SignatureVersion="s3v4"
ServiceUrl="https://s3.fr-par.scw.cloud"
}
Write-S3Object -EndpointUrl "https://s3.fr-par.scw.cloud" -Region "fr-par" -BucketName "scaphandre" -File scaphandre_${{ github.ref_name }}_installer.exe -key "x86_64/scaphandre_${{ github.ref_name }}_installer.exe" -PublicReadOnly -ClientConfig $clientconfig