Files
python/.github/workflows/build_python_3.12.yml
T
Erik GomezandClaude Sonnet 4.6 5f3cdae549 Modernize CI: macos-26 runner, drop pinned Xcode path, bump action pins
- runs-on: macos-13 → macos-26 (current Apple Silicon runner image)
- Drop --xcode-path arg from build invocation; script defaults to
  xcode-select -p, which on macos-26 resolves to the runner's
  default Xcode (no longer Xcode 15.2)
- actions/checkout v3.4.0 → v4.1.7
- apple-actions/import-codesign-certs v2.0.0 → v3.0.0
- actions/upload-artifact v4.6.2 → v4.3.4 (matches Nudge for
  cross-tool consistency)
- metcalfc/changelog-generator and softprops/action-gh-release
  already matched Nudge; left untouched

Pins mirror macadmins/nudge's Manual build workflow for consistency
across the maintainer's macOS toolchain.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 12:21:40 -05:00

97 lines
3.5 KiB
YAML

name: Build Python 3.12
env:
TYPE: "recommended"
DEV_INSTALLER_ID: "Developer ID Installer: Mac Admins Open Source (T4SK8ZXCXG)"
DEV_APPLICATION_ID: "Developer ID Application: Mac Admins Open Source (T4SK8ZXCXG)"
NOTARY_APP_PASSWORD: ${{ secrets.NOTARY_APP_PASSWORD_MAOS }}
PYTHON_VERSION: "3.12.10"
PYTHON_MAJOR_VERSION: "3.12"
on:
workflow_dispatch:
pull_request:
jobs:
build:
runs-on: macos-26
steps:
- name: Checkout python repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Install Apple Developer ID Application certificates
uses: apple-actions/import-codesign-certs@63fff01cd422d4b7b855d40ca1e9d34d2de9427d # v3.0.0
with:
keychain-password: ${{ github.run_id }}
p12-file-base64: ${{ secrets.APP_CERTIFICATES_P12_MAOS }}
p12-password: ${{ secrets.APP_CERTIFICATES_P12_PASSWORD_MAOS }}
- name: Install Apple Developer ID Installer certificates
uses: apple-actions/import-codesign-certs@63fff01cd422d4b7b855d40ca1e9d34d2de9427d # v3.0.0
with:
create-keychain: false # do not create a new keychain for this value
keychain-password: ${{ github.run_id }}
p12-file-base64: ${{ secrets.PKG_CERTIFICATES_P12_MAOS }}
p12-password: ${{ secrets.PKG_CERTIFICATES_P12_PASSWORD_MAOS }}
- name: Run build package script
run: |
./build_python_framework_pkgs.zsh \
--python-version "$PYTHON_VERSION" \
--installer-id "$DEV_INSTALLER_ID" \
--application-id "$DEV_APPLICATION_ID" \
--notary-password "$NOTARY_APP_PASSWORD"
- name: get environment variables
id: get_env_var
run: |
echo "PYTHON_BUILD_VERSION=$(/bin/cat ./build_info.txt)" >> $GITHUB_ENV
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@afdcb9470aebdb2252c0c95a1c130723c9e21f3a # v4.1
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
reverse: 'true'
- name: Create Release
id: create_release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
name: Python ${{env.PYTHON_BUILD_VERSION}}
tag_name: v${{env.PYTHON_BUILD_VERSION}}
draft: false
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
body: |
# Notes
Python ${{env.PYTHON_VERSION}} Framework
## Changes
- Upgraded Python to 3.12.10
**Note: Some of these updates may have breaking changes. Always test your code before deploying to production!**
Please see the `requirements_recommended.txt` for the current libraries being used.
## Final Release
**This is the final release of the Python 3.12 framework for Intel macs.** macOS 27 will ship without Intel support so please plan your migration soon.
# Flavors of Python
At this time, the automated build process will **only** create the Recommended package
## Recommended
This is a Python.framework with a recommended set of libraries for tools like Autopkg, Munki, and InstallApplications.
## Signing/Notarization
The signed package is fully notarized, including the Python.framework file
files: ${{github.workspace}}/outputs/*.pkg
- name: Upload packages
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: packages
path: outputs/