-
-
Notifications
You must be signed in to change notification settings - Fork 38
85 lines (73 loc) · 2.8 KB
/
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
77
78
79
80
81
82
83
84
85
name: Build, Sign and Release
on:
push:
tags:
- '*'
jobs:
build-windows:
name: Build Windows Executable
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11.7'
- name: Create and activate venv
run: |
python -m venv venv
.\venv\Scripts\Activate
- name: Install Dependencies
run: |
.\venv\Scripts\Activate
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build with PyInstaller
run: |
.\venv\Scripts\Activate
pyinstaller main.py --name WingmanAiCore --noconfirm --icon assets/wingman-ai.ico --paths venv/Lib/site-packages --add-data "venv/Lib/site-packages/azure/cognitiveservices/speech;azure/cognitiveservices/speech" --add-data "assets;assets" --add-data "services;services" --add-data "wingmen;wingmen" --add-data "templates;templates" --add-data "audio_samples;audio_samples" --add-data "LICENSE;." --add-data "lib/python3.dll;." --hidden-import urllib --hidden-import urllib.robotparser
- name: Upload Windows Exe Artifact
uses: actions/upload-artifact@v4
with:
name: WingmanAiCore-Windows-Build # Unique name for the build artifact
path: dist/WingmanAiCore/
sign-windows-executable:
needs: build-windows
runs-on: windows-2022
steps:
- uses: actions/checkout@v4 # for the action
- uses: actions/download-artifact@v4
with:
name: WingmanAiCore-Windows-Build
path: WingmanAiCore
- name: Sign
env:
CERTIFICATE_HOST: ${{ secrets.SM_HOST }}
CERTIFICATE_HOST_API_KEY: ${{ secrets.SM_API_KEY }}
CERTIFICATE_SHA1_HASH: ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }}
CLIENT_CERTIFICATE: ${{ secrets.SM_CLIENT_CERT_FILE_B64 }}
CLIENT_CERTIFICATE_PASSWORD: ${{ secrets.SM_CLIENT_CERT_PASSWORD }}
uses: ./.github/actions/code-sign
with:
path-to-binary: 'WingmanAiCore/WingmanAiCore.exe'
- name: Upload Windows Artifact
uses: actions/upload-artifact@v4
with:
name: WingmanAiCore-Windows-Signed # Unique name for the signed artifact
path: WingmanAiCore
release:
needs: [sign-windows-executable]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: WingmanAiCore-Windows-Signed # Ensure this matches the unique signed artifact name
path: .
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
WingmanAiCore-Windows.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}