Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownpersonog authored Jul 16, 2024
1 parent a7e8dbc commit 3251003
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Build and Release

on:
push:
branches:
- main

jobs:
build-and-release-linux:
runs-on: ubuntu-latest
Expand All @@ -13,12 +11,10 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -29,19 +25,15 @@ jobs:
pip install google-api-python-client
pip install requests
# Add any other dependencies your project needs
- name: Build with Nuitka
run: |
nuitka3 --onefile --enable-plugin=pyqt5 main.py
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y.%m.%d')"

- name: Generate release tag
id: tag
run: echo "::set-output name=release_tag::v${{ steps.date.outputs.date }}.${{ github.run_number }}"

- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -55,12 +47,9 @@ jobs:
body: |
### 🚀 Release Details
This release includes compiled executables for both Linux and Windows platforms.
**General Overview:**
- 🛠️ Enhancements to improve performance and stability.
**Note:** This build includes both Linux and Windows executables.
- name: Upload Linux Release Asset
uses: actions/upload-release-asset@v1
env:
Expand All @@ -70,40 +59,35 @@ jobs:
asset_path: ./main.bin
asset_name: main_linux.bin
asset_content_type: application/octet-stream

build-and-release-windows:
runs-on: windows-latest
needs: build-and-release-linux
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install nuitka
pip install PyQt5
pip install google-auth-oauthlib
pip install google-auth
pip install google-api-python-client
pip install requests
# Add any other dependencies your project needs
- name: Build with PyInstaller
- name: Build with Nuitka
run: |
pyinstaller --onefile main.py
python -m nuitka --onefile --enable-plugin=pyqt5 --assume-yes-for-downloads main.py
- name: Upload Windows Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
upload_url: ${{ needs.build-and-release-linux.outputs.upload_url }}
asset_path: ./dist/main.exe
asset_path: ./main.exe
asset_name: main_windows.exe
asset_content_type: application/octet-stream

0 comments on commit 3251003

Please sign in to comment.