name: Macro Cut Object for Magnets Release

on:
  push:
    tags:
      - 'macro-cut-object-for-magnets-v*'
  workflow_dispatch:
  workflow_call:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  release:
    uses: ./.github/workflows/macro-release-reusable.yaml
    with:
      tag_prefix: 'macro-cut-object-for-magnets-v'
      macro_dir: 'Cut_Object_for_Magnets'
      macro_file: 'CutObjectForMagnets.FCMacro'
      macro_name: 'Cut Object for Magnets'
      archive_name: 'CutObjectForMagnets'
      readme_file: 'README-CutObjectForMagnets.md'
      wiki_url: 'https://wiki.freecad.org/Macro_Cut_Object_for_Magnets'
      description: |
        A FreeCAD macro that cuts 3D objects along a plane and automatically adds aligned magnet holes with surface collision detection. Perfect for creating 3D printed parts that snap together with embedded magnets.

        **Features:**
        - Cut along preset planes (XY, XZ, YZ) or model datum planes
        - Automatic hole placement with even distribution
        - Surface collision detection prevents holes from breaking through walls
        - Configurable hole diameter, depth, and count
        - Creates PartDesign::Body objects with parametric Hole features
    permissions:
      contents: write
