-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (60 loc) · 1.69 KB
/
main.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
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 ${{ 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