name: Build and upload recommended package env: TYPE: "recommended" DEV_ID: "Developer ID Installer: Clever DevOps Co. (9GQZ7KUFR6)" PYTHON_VERSION: "3.9.5" on: pull_request: push: branches: - main jobs: build: runs-on: macos-11.0 steps: - name: Set environment variables id: set_env_var run: | echo "BUILD_DATE=$(/bin/date -u "+%m%d%Y%H%M%S")" >> $GITHUB_ENV echo "BUILD_DATE_RELEASE=$(/bin/date -u "+%B %d %Y %H:%M:%S")" >> $GITHUB_ENV - name: Checkout python repo uses: actions/checkout@v2 - name: Install Apple certificates if: github.ref == 'refs/heads/main' uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071 with: p12-file-base64: ${{ secrets.CERTIFICATES_P12 }} p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }} - name: Run build package script run: ./build_python_framework_pkgs.zsh "$TYPE" "$DEV_ID" "$PYTHON_VERSION" "${BUILD_DATE}" - name: Create Release if: github.ref == 'refs/heads/main' 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.9.5 Framework ## Changes - Upgraded Python to 3.9.5 - Updated the following libraries: - attrs to 21.2.0 - black to 21.6b0 - certifi to 2021.05.30 - cffi to 1.14.5 - cfgv to 3.3.0 - distlib to 0.3.2 - docklib to 1.3.0 - flake8-bugbear to 21.4.3 - flake8 to 3.9.2 - identify to 2.2.10 - importlib-metadata to 4.6.1 - isort to 5.9.2 - nodeenv to 1.6.0 - packaging to 21.0 - pathspec to 0.8.1 - pre-commit to 2.13.0 - pycodestyle to 2.7.0 - pyflakes to 2.3.1 - PyYAML to 5.4.1 - regex to 2021.7.6 - requests to 2.25.1 - six to 1.16.0 - tokenize-rt to 4.1.0 - toml to 0.10.2 - typed-ast to 1.4.3 - urllib3 to 1.26.6 - virtualenv to 20.0.27 - zipp to 3.5.0 # 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 if: github.ref == 'refs/heads/main' 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 if: github.ref == 'refs/heads/main' 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 if: github.ref == 'refs/heads/main' 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@v2 with: name: packages path: outputs/