Skip to content

refactor: use static-libpython and lto #73

refactor: use static-libpython and lto

refactor: use static-libpython and lto #73

Workflow file for this run

name: Build Package
on:
push:
branches:
- main
- dev
- feature/*
- refactor/*
- fix/
jobs:
build:
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: '3.13'
- name: Install Poetry
run: |
pip install poetry
poetry config virtualenvs.create false
- name: Install dependencies
run: poetry install
- name: Build Executable
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
enable-plugins: pyside6
script-name: rockbox_listenbrainz_scrobbler/rockbox_listenbrainz_ui.py
mode: onefile
static-libpython: auto
lto: auto
- name: Zip Artifacts
if: runner.os == 'Windows'
run: Compress-Archive -Path build/*.exe, build/*.bin, build/*.app -DestinationPath ${{ runner.os }}-artifacts.zip
- name: Zip Artifacts
if: runner.os != 'Windows'
run: zip -r ${{ runner.os }}-artifacts.zip build/*.exe build/*.bin build/*.app/*
- name: Upload Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: ${{ runner.os }} Build
path: ${{ runner.os }}-artifacts.zip
release:
name: Release
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/main'
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
path: artifacts/
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: '3.13'
- name: Install Poetry
run: |
pip install poetry
poetry config virtualenvs.create false
- name: Install dependencies
run: poetry install
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: "lts/*"
- name: Release
env:
GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
run: npx --package @semantic-release/git --package @semantic-release/exec --package @semantic-release/changelog --package conventional-changelog-conventionalcommits --package semantic-release-replace-plugin semantic-release