Update README.md #13
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: Build and Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-release-linux: | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
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 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 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 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
with: | |
tag_name: ${{ steps.tag.outputs.release_tag }} | |
release_name: Release ${{ steps.tag.outputs.release_tag }} | |
draft: false | |
prerelease: false | |
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: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
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 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 | |
run: | | |
pyinstaller --onefile 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_name: main_windows.exe | |
asset_content_type: application/octet-stream |