Update main.yml #3
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: | |
runs-on: ubuntu-latest | |
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 a compiled executable for Linux platforms only. | |
**General Overview:** | |
- 🛠️ Enhancements to improve performance and stability. | |
- 🖼️ Icons for this release are available for download [here](https://files.unknownvps.eu.org/get/file/icons.zip). | |
**Note:** This build is specifically for Linux systems. | |
- name: Upload 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.bin | |
asset_content_type: application/octet-stream |