Skip to content

Multi-Platform Build #15

Multi-Platform Build

Multi-Platform Build #15

Workflow file for this run

name: Multi-Platform Build
on:
push:
branches: [ "main" ]
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-latest
artifact_name: wgwarden.exe
- os: ubuntu-latest
artifact_name: wgwarden
- os: macos-latest
artifact_name: wgwarden
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install pyinstaller cryptography qrcode[pil] Pillow
- name: Build with PyInstaller
run: pyinstaller --onefile --noconsole --name ${{ matrix.artifact_name }} src/wgwarden.py
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/${{ matrix.artifact_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}