|
| 1 | +name: Build Python 3.15 |
| 2 | + |
| 3 | +env: |
| 4 | + TYPE: "recommended" |
| 5 | + DEV_INSTALLER_ID: "Developer ID Installer: Mac Admins Open Source (T4SK8ZXCXG)" |
| 6 | + DEV_APPLICATION_ID: "Developer ID Application: Mac Admins Open Source (T4SK8ZXCXG)" |
| 7 | + NOTARY_APP_PASSWORD: ${{ secrets.NOTARY_APP_PASSWORD_MAOS }} |
| 8 | + PYTHON_VERSION: "3.15.1" |
| 9 | + PYTHON_MAJOR_VERSION: "3.15" |
| 10 | + |
| 11 | +on: |
| 12 | + workflow_dispatch: |
| 13 | + pull_request: |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + runs-on: macos-26 |
| 18 | + |
| 19 | + steps: |
| 20 | + - name: Checkout python repo |
| 21 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 22 | + with: |
| 23 | + fetch-depth: 0 |
| 24 | + |
| 25 | + - name: Install Apple Developer ID Application certificates |
| 26 | + uses: apple-actions/import-codesign-certs@5142e029c445c10ffc7149d172e540235a065466 # v7.0.0 |
| 27 | + with: |
| 28 | + keychain-password: ${{ github.run_id }} |
| 29 | + p12-file-base64: ${{ secrets.APP_CERTIFICATES_P12_MAOS }} |
| 30 | + p12-password: ${{ secrets.APP_CERTIFICATES_P12_PASSWORD_MAOS }} |
| 31 | + |
| 32 | + - name: Install Apple Developer ID Installer certificates |
| 33 | + uses: apple-actions/import-codesign-certs@5142e029c445c10ffc7149d172e540235a065466 # v7.0.0 |
| 34 | + with: |
| 35 | + create-keychain: false # do not create a new keychain for this value |
| 36 | + keychain-password: ${{ github.run_id }} |
| 37 | + p12-file-base64: ${{ secrets.PKG_CERTIFICATES_P12_MAOS }} |
| 38 | + p12-password: ${{ secrets.PKG_CERTIFICATES_P12_PASSWORD_MAOS }} |
| 39 | + |
| 40 | + - name: Run build package script |
| 41 | + run: | |
| 42 | + ./build_python_framework_pkgs.zsh \ |
| 43 | + --python-version "$PYTHON_VERSION" \ |
| 44 | + --installer-id "$DEV_INSTALLER_ID" \ |
| 45 | + --application-id "$DEV_APPLICATION_ID" \ |
| 46 | + --notary-password "$NOTARY_APP_PASSWORD" |
| 47 | +
|
| 48 | + - name: get environment variables |
| 49 | + id: get_env_var |
| 50 | + run: | |
| 51 | + echo "PYTHON_BUILD_VERSION=$(/bin/cat ./build_info.txt)" >> $GITHUB_ENV |
| 52 | +
|
| 53 | + - name: Generate changelog |
| 54 | + if: github.event_name == 'workflow_dispatch' |
| 55 | + id: changelog |
| 56 | + uses: metcalfc/changelog-generator@0440d0932f9a0dd1cc9ecd8412830761351323bd # v4.7.0 |
| 57 | + with: |
| 58 | + myToken: ${{ secrets.GITHUB_TOKEN }} |
| 59 | + reverse: 'true' |
| 60 | + |
| 61 | + - name: Create Release |
| 62 | + if: github.event_name == 'workflow_dispatch' |
| 63 | + id: create_release |
| 64 | + uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0 |
| 65 | + with: |
| 66 | + name: Python ${{env.PYTHON_BUILD_VERSION}} |
| 67 | + tag_name: v${{env.PYTHON_BUILD_VERSION}} |
| 68 | + draft: false |
| 69 | + prerelease: true |
| 70 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 71 | + body: | |
| 72 | + # Notes |
| 73 | + Python ${{env.PYTHON_VERSION}} Framework |
| 74 | +
|
| 75 | + ## Changes |
| 76 | + - Upgraded Python to 3.15.1 |
| 77 | + **Note: Some of these updates may have breaking changes. Always test your code before deploying to production!** |
| 78 | +
|
| 79 | + Please see the `requirements_recommended.txt` for the current libraries being used. |
| 80 | +
|
| 81 | + ${{ steps.changelog.outputs.changelog }} |
| 82 | +
|
| 83 | + # Flavors of Python |
| 84 | + At this time, the automated build process will **only** create the Recommended package |
| 85 | +
|
| 86 | + ## Recommended |
| 87 | + This is a Python.framework with a recommended set of libraries for tools like Autopkg, Munki, and InstallApplications. |
| 88 | +
|
| 89 | + ## Signing/Notarization |
| 90 | + The signed package is fully notarized, including the Python.framework file |
| 91 | + files: ${{github.workspace}}/outputs/*.pkg |
| 92 | + |
| 93 | + - name: Upload packages |
| 94 | + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 95 | + with: |
| 96 | + name: packages |
| 97 | + path: outputs/ |
0 commit comments