Skip to content

Bump dev version

Bump dev version #1352

Workflow file for this run

name: macOS
on: [push, pull_request]
permissions: read-all
jobs:
build:
runs-on: macos-latest
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
CFLAGS: -arch x86_64 -arch arm64
ARCHFLAGS: -arch x86_64 -arch arm64
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install the project
run: uv sync --locked
- name: Run pre-commit hooks
run: |
uv tool install pre-commit
pre-commit install
pre-commit run --all-files --verbose
# Adapted from https://github.com/sabnzbd/sabnzbd/blob/develop/.github/workflows/build_release.yml#L80
- name: Explicitly use universal versions
run: |
# Export exact versions
uv pip freeze > requirements.txt
grep cryptography requirements.txt > cryptography.txt
grep cffi requirements.txt > source-reqs.txt
grep pyscard requirements.txt >> source-reqs.txt
# Remove non-universal packages
uv pip uninstall cryptography cffi pyscard
# Build cffi from source to get universal build
uv pip install --upgrade -r source-reqs.txt --no-binary :all:
# Explicitly install pre-build universal build of cryptography
pip download -r cryptography.txt --platform macosx_10_12_universal2 --only-binary :all: --no-deps --dest .
uv pip install -r cryptography.txt --no-cache-dir --no-index --find-links .
- name: PyInstaller
run: |
uv run pyinstaller ykman.spec
dist/ykman/ykman --version
[[ -z "$(dist/ykman/ykman --version | grep -E "not found|missing")" ]]
- name: Simplify Python bundle
working-directory: ./dist/ykman/_internal
run: |
mv $(readlink Python) Python
rm -rf Python.framework
- name: Copy scripts
shell: bash
run: cp -r resources/macos dist/scripts
- name: Build installer
working-directory: ./dist
run: ./scripts/make_pkg.sh
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: ykman-builds-macos
path: dist