Skip to content

Update main.yml

Update main.yml #6

Workflow file for this run

name: Create Standalone Executable
on:
push:
tags:
- "v2*"
workflow_dispatch:
env:
LINUX_NAME: vyxal2
WINDOWS_NAME: vyxal-windows
MACOS_NAME: vyxal-macos
jobs:
make-the-stuff:
name: Generate executable for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
exe-name: vyxal2
- os: windows-latest
exe-name: vyxal-windows
steps:
- name: Clone Vyxal repository
uses: actions/checkout@v3
with:
repository: Vyxal/Vyxal
ref: version-2
fetch-depth: 0
- name: Debug git info
run: |
git branch
git status
git rev-parse HEAD
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Pip install requirements
run: pip install .
- name: Install pyinstaller
run: pip install pyinstaller
- name: Run pyinstaller
run: |
pyinstaller vyxal/__main__.py --name ${{ matrix.exe-name }}
- name: Create zip archive (Linux)
if: runner.os == 'Linux'
run: |
cd dist
zip -r ${{ matrix.exe-name }}.zip ${{ matrix.exe-name }}
- name: Create zip archive (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
cd dist
Compress-Archive -Path ${{ matrix.exe-name }} -DestinationPath ${{ matrix.exe-name }}.zip
- name: Add vyxal2 to release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/${{ matrix.exe-name }}.zip