105 lines
4.1 KiB
YAML
105 lines
4.1 KiB
YAML
name: Build and upload recommended package
|
|
|
|
env:
|
|
TYPE: "recommended"
|
|
DEV_ID: "Developer ID Installer: Clever DevOps Co. (9GQZ7KUFR6)"
|
|
PYTHON_VERSION: "3.8.2"
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- name: Set environment variables
|
|
id: set_env_var
|
|
run: |
|
|
echo ::set-env name=BUILD_DATE::$(/bin/date -u "+%m%d%Y%H%M%S")
|
|
echo ::set-env name=BUILD_DATE_RELEASE::$(/bin/date -u "+%B %d %Y %H:%M:%S")
|
|
|
|
- name: Checkout python repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Apple certificates
|
|
if: github.ref == 'refs/heads/main'
|
|
uses: apple-actions/import-codesign-certs@v1
|
|
with:
|
|
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
|
|
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
|
|
|
|
- name: Run build package script
|
|
run: /usr/bin/sudo ./build_python_framework_pkgs.zsh "$TYPE" "$DEV_ID" "$PYTHON_VERSION" "${BUILD_DATE}"
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: v.${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}
|
|
release_name: Python ${{env.PYTHON_VERSION}} (${{env.BUILD_DATE_RELEASE}})
|
|
body: |
|
|
# Notes
|
|
Python 3.8.2 Framework
|
|
|
|
The package versions comes with two symbolic links to ease the use. Please see the README for more information.
|
|
- `/usr/local/bin/managed_python3`
|
|
- `/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3`
|
|
|
|
## Changes
|
|
- Python3.framework is now in `/Library/ManagedFrameworks/Python` and no longer in `/Library/ManagedFrameworks`
|
|
- `/Library/SystemFrameworks` is now `/Library/ManagedFrameworks`
|
|
- `/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3` is the new recommended shebang path
|
|
- `/usr/local/bin/python3.framework` is now `/usr/local/bin/managed_python3`
|
|
- Add optional signed packages, build by [Clever DevOps](https://www.cleverdevops.com) signing certificate
|
|
- Remove unnecessary `Python3.framework/python3` symlink
|
|
|
|
# Flavors of Python
|
|
At this time, the automated build process will **only** create the Recommended package
|
|
|
|
## Recommended
|
|
This is a Python.framework that contains everything from minimal, and a few libraries that various well known open source projects require.
|
|
draft: false
|
|
prerelease: true
|
|
|
|
- name: Upload Unsigned Package Release Asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./outputs/python_${{env.TYPE}}-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.pkg
|
|
asset_name: python_${{env.TYPE}}-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.pkg
|
|
asset_content_type: application/x-newton-compatible-pkg
|
|
|
|
- name: Upload Signed Package Release Asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./outputs/python_${{env.TYPE}}_signed-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.pkg
|
|
asset_name: python_${{env.TYPE}}_signed-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.pkg
|
|
asset_content_type: application/x-newton-compatible-pkg
|
|
|
|
- name: Upload Python Framework Release Asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./outputs/Python3.framework_${{env.TYPE}}-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.zip
|
|
asset_name: Python3.framework_${{env.TYPE}}-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.zip
|
|
asset_content_type: application/zip
|
|
|
|
- name: Upload packages
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: packages
|
|
path: outputs/
|