diff --git a/.github/workflows/build_python_3.9.10.yml b/.github/workflows/build_python_3.9.10.yml new file mode 100644 index 0000000..4c7ed3b --- /dev/null +++ b/.github/workflows/build_python_3.9.10.yml @@ -0,0 +1,133 @@ +name: Build and upload recommended package + +env: + TYPE: "recommended" + DEV_ID: "Developer ID Installer: Clever DevOps Co. (9GQZ7KUFR6)" + PYTHON_VERSION: "3.9.10" + +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.10 Framework + + ## Changes + - Upgraded Python to 3.9.10 + **Note: Some of these updates have breaking changes. Always test your code before deploying to production!** + - Updated the following libraries: + - attrs to 21.4.0 + - black to 22.1.0 + - certifi to 2021.10.8 + - cffi to 1.15.0 + - cfgv to 3.3.1 + - chardet to 4.0.0 + - click to 8.0.3 + - distlib to 0.3.4 + - filelock to 3.4.2 + - flake8-bugbear to 22.1.11 + - flake8 to 4.0.1 + - identify to 2.4.7 + - idna to 3.3 + - importlib-metadata to 4.10.1 + - isort to 5.10.1 + - packaging to 21.3 + - pathspec to 0.9.0 + - pre-commit to 2.17.0 + - pycodestyle to 2.8.0 + - pycparser to 2.21 + - pyflakes to 2.4.0 + - pyobjc to 8.2 + - pyparsing to 3.0.7 + - PyYAML to 6.0 + - regex to 2022.1.18 + - requests to 2.27.1 + - tokenize-rt to 4.2.0 + - typed-ast to 1.5.2 + - urllib3 to 1.26.8 + - virtualenv to 20.13.0 + - xattr to 0.9.9 + - zipp to 3.7.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/