Skip to content

fix action trigger

fix action trigger #58

Workflow file for this run

name: Build, Sign and Release
on:
push:
tags:
- '*'
jobs:
build-windows:
name: Build Windows Executable
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11.6'
- name: Create and activate venv
run: |
python -m venv venv
.\venv\Scripts\Activate
- name: Install Dependencies
run: |
.\venv\Scripts\Activate
pip install -r requirements.txt
- name: Build with PyInstaller
run: |
.\venv\Scripts\Activate
pyinstaller main.py --name WingmanAiCore --noconfirm --icon assets/icons/wingman-ai.png --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 "configs/system/config.example.yaml;configs/system/." --add-data "wingmen;wingmen" --add-data "audio_samples;audio_samples" --add-data "LICENSE;."
- name: Upload Windows Exe Artifact
uses: actions/upload-artifact@v3
with:
name: WingmanAiCore-Windows
path: dist/WingmanAiCore/
- name: Upload action code
uses: actions/upload-artifact@v3
with:
name: action-code
path: .github/actions/code-sign
sign-windows-executable:
needs: build-windows
runs-on: windows-2022
steps:
- uses: actions/download-artifact@v3
with:
name: WingmanAiCore-Windows
path: .
- uses: actions/download-artifact@v3
with:
name: action-code
path: .github/actions/code-sign
- 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.exe'
- name: Upload Windows Artifact
uses: actions/upload-artifact@v3
with:
name: WingmanAiCore-Windows
path: .
release:
needs: [sign-windows-executable]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: WingmanAiCore-Windows
path: .
- name: Remove Unwanted Files
run: |
rm -f *.taskkey
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
WingmanAiCore-Windows.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}