Skip to content

Commit

Permalink
feat: Adiciona suporte para builds em Windows e Linux no workflow do …
Browse files Browse the repository at this point in the history
…GitHub Actions
  • Loading branch information
josejefferson committed Dec 30, 2024
1 parent 6f51934 commit 0b4206f
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 5 deletions.
63 changes: 58 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
name: Build Executable

jobs:
build-release:
build-windows:
name: Build Windows Executable
runs-on: windows-latest
steps:
Expand All @@ -26,11 +26,64 @@ jobs:
run: .\build.bat

- name: Rename executable
run: mv "bin/MobyStk.exe" "bin/MobyStk ${{github.ref_name}}.exe"
run: mv "bin/MobyStk.exe" "bin/MobyStk-${{github.ref_name}}-Windows-x64.exe"

- name: Release
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: windows-build
path: bin/MobyStk-${{github.ref_name}}-Windows-x64.exe

build-linux:
name: Build Linux Executable
runs-on: ubuntu-latest
steps:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.13
architecture: x64

- name: Checkout repository
uses: actions/checkout@v4

- name: Build
uses: coactions/setup-xvfb@v1
with:
run: |
chmod +x build.sh
./build.sh
- name: Rename executable
run: mv "bin/MobyStk" "bin/MobyStk-${{github.ref_name}}-Linux-x64"

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: linux-build
path: bin/MobyStk-${{github.ref_name}}-Linux-x64

create-release:
name: Create Release
runs-on: ubuntu-latest
needs: [build-windows, build-linux]
steps:
- name: Download Artifacts (Windows)
uses: actions/download-artifact@v4
with:
name: windows-build

- name: Download Artifacts (Linux)
uses: actions/download-artifact@v4
with:
name: linux-build

- name: Create Release
uses: softprops/action-gh-release@v2
with:
body: ''
files: bin/MobyStk ${{github.ref_name}}.exe
prerelease: ${{ endsWith(github.ref_name, '-beta') }}
files: |
./MobyStk-${{github.ref_name}}-Windows-x64.exe
./MobyStk-${{github.ref_name}}-Linux-x64
fail_on_unmatched_files: true
prerelease: ${{endsWith(github.ref_name, '-beta')}}
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

PYTHON_CMD=$(command -v python3 || command -v python)

# Configura o ambiente virtual
if [ ! -d "venv" ]; then
$PYTHON_CMD -m venv venv
Expand Down
1 change: 1 addition & 0 deletions server/src/module_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
("colorama", "0.4.6"),
("jsonschema", "4.23.0"),
("prompt_toolkit", "3.0.48"),
("psutil", "6.1.1"),
("pyqrcode", "1.2.1"),
("pynput", "1.7.7"),
("requests", "2.32.3"),
Expand Down

0 comments on commit 0b4206f

Please sign in to comment.