Update main.yml #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Standalone Executable | |
on: | |
push: | |
tags: | |
- "v2*" | |
workflow_dispatch: | |
env: | |
LINUX_NAME: vyxal-linux | |
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: vyxal-linux | |
- 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 vyxal2 | |
- name: Create zip archive (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
cd dist | |
zip -r --symlinks ${{ matrix.exe-name }}.zip vyxal2 | |
- name: Create zip archive (Windows) | |
if: runner.os == 'Windows' | |
shell: pwsh | |
run: | | |
cd dist | |
Compress-Archive -Path vyxal2 -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 |