Skip to content

Build binaries and Upload to Release #53

Build binaries and Upload to Release

Build binaries and Upload to Release #53

name: Build binaries and Upload to Release
on:
workflow_run:
workflows: ["Sync Version"]
types:
- completed
workflow_dispatch: {}
defaults:
run:
shell: bash
jobs:
build:
name: Build and Release for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
python-version: ["3.12"]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: "Setup Python, Poetry and Dependencies"
uses: packetcoders/action-setup-cache-python-poetry@main
with:
poetry-version: 1.7.1
python-version: ${{matrix.python-version}}
- name: Build
run: |
poetry add pyinstaller
poetry run pyinstaller -F -n ToolDelta-${{ matrix.os == 'windows-latest' && 'windows.exe' || 'linux' }} -i logo.ico main.py
- name: Get Version
run: echo "VERSION=$(<version)" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.VERSION }}
name: ${{ env.VERSION }}
files: dist/*