Skip to content

Workflow file for this run

name: Build and Release with Nuitka
on:
push:
tags:
- 'v*'
jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check Out
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
cache: 'pip'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip &&
python -m pip install -r requirements.txt
- name: Build
uses: Charles-Hello/[email protected]
with:
nuitka-version: main
script-name: main.py
include-module: tgbot_client.startup, tortoise.backends.sqlite, apscheduler.triggers.interval, apscheduler.triggers.cron
onefile: true
output-file: tg_user
output-dir: build
- run: mv build/tg_user.exe build/window_tg_user.exe
if: matrix.os == 'windows-latest'
- run: mv build/tg_user build/linux_tg_user
if: matrix.os == 'ubuntu-20.04'
- run: mv build/tg_user build/macos_tg_user
if: matrix.os == 'macos-latest'
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }} Build
path: |
build/window_tg_user.exe
build/linux_tg_user
build/macos_tg_user
- name: ${{ runner.os }} Release
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
fail_on_unmatched_files: false
files: |
build/window_tg_user.exe
build/linux_tg_user
build/macos_tg_user