vey-mimalloc-sys 0.3.2+3.7.0

Rust FFI binding to mimalloc
# note: since we build releases from tags (strategy.matrix.branch),
# - we should only use official version tags on vetted branches,
# - we only allow manual runs (by admins),
# - we always produce draft releases (not actual ones so we can verify first)
# - ensure persist-credentials: false
on:
  workflow_dispatch:   # run the workflow manually

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true # Cancel any in-progress runs of this workflow when a new run is triggered on the same ref (branch or tag)

permissions:
  contents: write

env:
  RELEASE: Release v3.7.0
  FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

name: Release
jobs:
  build:
    name: Bundle
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        branch: [v3.7.0, v2.5.3, v1.15.3]
        # we build on the oldest ubuntu version for better binary compatibility.
        os: [windows-latest, macOS-latest, macos-15-intel, ubuntu-22.04, ubuntu-22.04-arm]

    steps:
      # Checkout: https://github.com/actions/checkout
      - name: Checkout repository
        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          ref: ${{ matrix.branch }}
          fetch-tags: true
          fetch-depth: 0
          persist-credentials: false

      # Build
      - name: Build (Windows)
        if: runner.os == 'Windows'
        run: |
          ./bin/bundle.bat

      - name: Build (Linux, macOS)
        if: runner.os != 'Windows'
        run: |
          ./bin/bundle.sh

      # Create a release: https://github.com/softprops/action-gh-release (MIT license)
      - name: Release
        uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
        if: ${{ env.RELEASE != '' && env.RELEASE != 'no' }}
        with:
          name: ${{ env.RELEASE }}
          draft: true
          body_path: doc/release-notes.md
          files: |
            out/bundle/*.tar.gz