Skip to content

build(deps): bump actions/download-artifact from 7 to 8 #142

build(deps): bump actions/download-artifact from 7 to 8

build(deps): bump actions/download-artifact from 7 to 8 #142

Workflow file for this run

name: 'Build'
on:
push:
branches: ['**']
defaults:
run:
shell: bash
jobs:
matrix-build:
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
name: Build (${{ matrix.os }})
outputs:
artifact_app_name: ${{ steps.build_step.outputs.artifact_app_name }}
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install Dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update -y
sudo apt upgrade -y
sudo apt install -y qt6-base-dev
- name: Install just
uses: taiki-e/install-action@just
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: false
- name: Run Build
id: build_step
run: |
set -euo pipefail
function debug() { echo -e "\033[0;35m$*\033[0m"; }
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
#
echo "::group::Remove Qml Test Files"
execute find . -type f -name 'tst_*' -delete
echo "::endgroup::"
#
echo "::group::Set Build Information"
CURRENT_COMMIT="$(git rev-parse HEAD)"
CURRENT_COMMIT="${CURRENT_COMMIT:0:8}"
echo "git commit: $CURRENT_COMMIT"
ARTIFACT_APP_NAME="MyApp-$CURRENT_COMMIT"
echo "artifact app name: $ARTIFACT_APP_NAME"
echo "artifact_app_name=$ARTIFACT_APP_NAME" >> $GITHUB_OUTPUT
echo "::endgroup::"
#
echo "::group::Setup Virtual Environment"
execute just init
echo "::endgroup::"
#
echo "::group::Run Python Build"
execute just test-python
execute just clean
execute just build
echo "::endgroup::"
#
RELEASE_NAME="release-build-${RUNNER_OS@L}"
echo "release_name=$RELEASE_NAME" >> $GITHUB_OUTPUT
debug "Uploading build/release as $RELEASE_NAME"
- name: Upload Build Artifact
uses: actions/upload-artifact@v7
with:
path: build/release
name: ${{ steps.build_step.outputs.release_name }}
test_qml:
runs-on: ubuntu-latest
name: Test Qml
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Install Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install just
uses: taiki-e/install-action@just
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: false
- name: Update Packages
run: sudo apt update -y
- name: Install Dependencies
run: sudo apt install -y libegl1
- name: Initialize Project
run: just init
- name: Execute Qml Tests
run: just test-qml
distributable-windows:
runs-on: windows-latest
name: Build Windows
needs:
- matrix-build
- test_qml
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Install Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install just
uses: taiki-e/install-action@just
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: false
- name: Remove Python sources
run: rm -rf src main.py
- name: Download Build Artifact
uses: actions/download-artifact@v8
with:
path: build/release
name: release-build-windows
- name: Setup Build Environment
run: |
just init '--no-group dev'
uv pip install pyinstaller
- name: Build Bundle
run: |
source .venv/Scripts/activate
pyinstaller \
--name MyApp \
--workpath build-windows \
--icon=build-aux/icon.ico \
--collect-binaries PySide6 \
--add-data "LICENSES;LICENSES" \
--noconsole \
build/release/main.py
- name: Remove Redundant Binaries
run: |
find dist/MyApp -type f -name 'Qt6WebEngineCore.dll' -delete
find dist/MyApp -type f -name 'QtWidgets.pyd' -delete
find dist/MyApp -type f -name 'opengl32sw.dll' -delete
find dist/MyApp -type f -name 'qt6qmlcompiler.dll' -delete
- name: Upload Artifact
uses: actions/upload-artifact@v7
with:
name: ${{ needs.matrix-build.outputs.artifact_app_name }}-win-x86_64
path: dist/MyApp