-
Notifications
You must be signed in to change notification settings - Fork 258
100 lines (83 loc) · 3.75 KB
/
windows_build_deploy.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build GUI for Windows
on:
workflow_dispatch:
pull_request:
branches: [master, development]
push:
branches: [master, development]
permissions:
id-token: write
contents: read
env:
AWS_REGION : us-east-1
jobs:
build:
name: Build for Windows
runs-on: windows-latest
steps:
- name: Clone Repository
uses: actions/checkout@v3
- name: Install Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- name: Install Processing
run: |
mkdir %GITHUB_WORKSPACE%\processing
cd %GITHUB_WORKSPACE%\processing
curl -O -L --insecure https://github.com/processing/processing4/releases/download/processing-1292-4.2/processing-4.2-windows-x64.zip
ls -l %GITHUB_WORKSPACE%\processing
unzip processing-4.2-windows-x64.zip
ls -l %GITHUB_WORKSPACE%\processing\processing-4.2
mkdir %userprofile%\documents\processing\libraries
xcopy %GITHUB_WORKSPACE%\OpenBCI_GUI\libraries\* %userprofile%\documents\processing\libraries /s /i /q
ls -l %userprofile%\documents\processing\libraries
shell: cmd
- name: Set Path
run: |
echo %GITHUB_WORKSPACE%\processing\processing-4.2>>%GITHUB_PATH%
echo C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64>>%GITHUB_PATH%
shell: cmd
- name: Print Path
run: echo %PATH%
shell: cmd
- name: Check processing-java Command
run: processing-java --help
shell: cmd
- name: Run Unit Tests
run: python %GITHUB_WORKSPACE%\GuiUnitTests\run-unittests.py
shell: cmd
- name: Build
run: python %GITHUB_WORKSPACE%\release\build.py
shell: cmd
- name: Sign
run: |
dotnet tool install --global azuresigntool
mt -manifest %GITHUB_WORKSPACE%\release\windows\gui.manifest -outputresource:%GITHUB_WORKSPACE%\application.windows64\OpenBCI_GUI.exe;#1
mt -manifest %GITHUB_WORKSPACE%\release\windows\java.manifest -outputresource:%GITHUB_WORKSPACE%\application.windows64\java\bin\java.exe;#1
mt -manifest %GITHUB_WORKSPACE%\release\windows\javaw.manifest -outputresource:%GITHUB_WORKSPACE%\application.windows64\java\bin\javaw.exe;#1
azuresigntool sign --azure-key-vault-url "${{ secrets.AZURE_KEY_VAULT_URI }}" --azure-key-vault-client-id "${{ secrets.AZURE_CLIENT_ID }}" --azure-key-vault-tenant-id "${{ secrets.AZURE_TENANT_ID }}" --azure-key-vault-client-secret "${{ secrets.AZURE_CLIENT_SECRET }}" --azure-key-vault-certificate "${{ secrets.AZURE_CERT_NAME }}" --timestamp-rfc3161 http://timestamp.digicert.com --verbose %GITHUB_WORKSPACE%\application.windows64\OpenBCI_GUI.exe
shell: cmd
- name: Package
run: python %GITHUB_WORKSPACE%\release\package.py
shell: cmd
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ env.AWS_REGION }}
- name: Get Branch Names
id: branch-name
uses: tj-actions/branch-names@v7
- name: Store Build on AWS
run: |
cd ${{ github.workspace }}
ls
echo "${{ steps.branch-name.outputs.head_ref_branch }}"
set S3_BRANCH_FOLDER=s3://openbci-public-gui-v6/${{ steps.branch-name.outputs.head_ref_branch }}
echo %S3_BRANCH_FOLDER%
aws s3 rm s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
aws s3 cp ${{ github.workspace }}/. %S3_BRANCH_FOLDER% --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
aws s3 cp ${{ github.workspace }}/. s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
shell: cmd