Skip to content

Bump version to 0.2.7 #19

Bump version to 0.2.7

Bump version to 0.2.7 #19

name: SmartDiff Nuitka
on:
workflow_dispatch:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
- name: Windows
os: windows-latest
launcher: smartdiff_nuitka_windows.py
artifact_path: dist/nuitka_windows
archive_name: SmartDiff-windows.zip
- name: Linux
os: ubuntu-22.04
launcher: smartdiff_nuitka_linux.py
artifact_path: dist/nuitka_linux
archive_name: SmartDiff-linux.tar.gz
- name: macOS arm64
os: macos-latest
launcher: smartdiff_nuitka_macos.py
artifact_path: dist/nuitka_macos
archive_name: SmartDiff-macos-arm64.tar.gz
- name: macOS x86_64
os: macos-latest
launcher: smartdiff_nuitka_macos_x86.py
artifact_path: dist/nuitka_macos_x86
archive_name: SmartDiff-macos-x86_64.tar.gz
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install uv
run: python -m pip install uv
- name: Verify Python sources
run: uv run python -m compileall src smartdiff_nuitka_windows.py smartdiff_nuitka_linux.py smartdiff_nuitka_macos.py smartdiff_nuitka_macos_x86.py
- name: Build with Nuitka (macOS)
if: runner.os == 'macOS'
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
run: uv run --with nuitka python -m nuitka ${{ matrix.launcher }}
- name: Build with Nuitka (non-macOS)
if: runner.os != 'macOS'
run: uv run --with nuitka python -m nuitka ${{ matrix.launcher }}
- name: Pack Windows artifact
if: runner.os == 'Windows'
shell: pwsh
run: Compress-Archive -Path "${{ matrix.artifact_path }}\\*" -DestinationPath "${{ matrix.archive_name }}"
- name: Pack Unix artifact
if: runner.os != 'Windows'
run: tar -czf "${{ matrix.archive_name }}" -C "${{ matrix.artifact_path }}" .
- name: Upload packaged artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.archive_name }}
path: ${{ matrix.archive_name }}
if-no-files-found: error
release:
name: Publish Release
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download packaged artifacts
uses: actions/download-artifact@v5
with:
path: release-assets
- name: Flatten release assets
run: find release-assets -type f -exec cp {} . \;
- name: Create or update GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh release view "${{ github.ref_name }}" --repo "${{ github.repository }}" >/dev/null 2>&1; then
gh release upload "${{ github.ref_name }}" ./*.zip ./*.tar.gz --clobber --repo "${{ github.repository }}"
else
gh release create "${{ github.ref_name }}" ./*.zip ./*.tar.gz --generate-notes --repo "${{ github.repository }}"
fi