|
| 1 | +name: Build and upload recommended package |
| 2 | + |
| 3 | +env: |
| 4 | + TYPE: "recommended" |
| 5 | + DEV_ID: "Developer ID Installer: Clever DevOps Co. (9GQZ7KUFR6)" |
| 6 | + PYTHON_VERSION: "3.9.10" |
| 7 | + |
| 8 | +on: |
| 9 | + pull_request: |
| 10 | + push: |
| 11 | + branches: |
| 12 | + - main |
| 13 | + |
| 14 | +jobs: |
| 15 | + build: |
| 16 | + runs-on: macos-11.0 |
| 17 | + |
| 18 | + steps: |
| 19 | + - name: Set environment variables |
| 20 | + id: set_env_var |
| 21 | + run: | |
| 22 | + echo "BUILD_DATE=$(/bin/date -u "+%m%d%Y%H%M%S")" >> $GITHUB_ENV |
| 23 | + echo "BUILD_DATE_RELEASE=$(/bin/date -u "+%B %d %Y %H:%M:%S")" >> $GITHUB_ENV |
| 24 | +
|
| 25 | + - name: Checkout python repo |
| 26 | + uses: actions/checkout@v2 |
| 27 | + |
| 28 | + - name: Install Apple certificates |
| 29 | + if: github.ref == 'refs/heads/main' |
| 30 | + uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071 |
| 31 | + with: |
| 32 | + p12-file-base64: ${{ secrets.CERTIFICATES_P12 }} |
| 33 | + p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }} |
| 34 | + |
| 35 | + - name: Run build package script |
| 36 | + run: ./build_python_framework_pkgs.zsh "$TYPE" "$DEV_ID" "$PYTHON_VERSION" "${BUILD_DATE}" |
| 37 | + |
| 38 | + - name: Create Release |
| 39 | + if: github.ref == 'refs/heads/main' |
| 40 | + id: create_release |
| 41 | + uses: actions/create-release@v1 |
| 42 | + env: |
| 43 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 44 | + with: |
| 45 | + tag_name: v.${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}} |
| 46 | + release_name: Python ${{env.PYTHON_VERSION}} (${{env.BUILD_DATE_RELEASE}}) |
| 47 | + body: | |
| 48 | + # Notes |
| 49 | + Python 3.9.10 Framework |
| 50 | +
|
| 51 | + ## Changes |
| 52 | + - Upgraded Python to 3.9.10 |
| 53 | + **Note: Some of these updates have breaking changes. Always test your code before deploying to production!** |
| 54 | + - Updated the following libraries: |
| 55 | + - attrs to 21.4.0 |
| 56 | + - black to 22.1.0 |
| 57 | + - certifi to 2021.10.8 |
| 58 | + - cffi to 1.15.0 |
| 59 | + - cfgv to 3.3.1 |
| 60 | + - chardet to 4.0.0 |
| 61 | + - click to 8.0.3 |
| 62 | + - distlib to 0.3.4 |
| 63 | + - filelock to 3.4.2 |
| 64 | + - flake8-bugbear to 22.1.11 |
| 65 | + - flake8 to 4.0.1 |
| 66 | + - identify to 2.4.7 |
| 67 | + - idna to 3.3 |
| 68 | + - importlib-metadata to 4.10.1 |
| 69 | + - isort to 5.10.1 |
| 70 | + - packaging to 21.3 |
| 71 | + - pathspec to 0.9.0 |
| 72 | + - pre-commit to 2.17.0 |
| 73 | + - pycodestyle to 2.8.0 |
| 74 | + - pycparser to 2.21 |
| 75 | + - pyflakes to 2.4.0 |
| 76 | + - pyobjc to 8.2 |
| 77 | + - pyparsing to 3.0.7 |
| 78 | + - PyYAML to 6.0 |
| 79 | + - regex to 2022.1.18 |
| 80 | + - requests to 2.27.1 |
| 81 | + - tokenize-rt to 4.2.0 |
| 82 | + - typed-ast to 1.5.2 |
| 83 | + - urllib3 to 1.26.8 |
| 84 | + - virtualenv to 20.13.0 |
| 85 | + - xattr to 0.9.9 |
| 86 | + - zipp to 3.7.0 |
| 87 | +
|
| 88 | + # Flavors of Python |
| 89 | + At this time, the automated build process will **only** create the Recommended package |
| 90 | +
|
| 91 | + ## Recommended |
| 92 | + This is a Python.framework that contains everything from minimal, and a few libraries that various well known open source projects require. |
| 93 | + draft: false |
| 94 | + prerelease: true |
| 95 | + |
| 96 | + - name: Upload Unsigned Package Release Asset |
| 97 | + if: github.ref == 'refs/heads/main' |
| 98 | + uses: actions/upload-release-asset@v1 |
| 99 | + env: |
| 100 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 101 | + with: |
| 102 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 103 | + asset_path: ./outputs/python_${{env.TYPE}}-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.pkg |
| 104 | + asset_name: python_${{env.TYPE}}-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.pkg |
| 105 | + asset_content_type: application/x-newton-compatible-pkg |
| 106 | + |
| 107 | + - name: Upload Signed Package Release Asset |
| 108 | + if: github.ref == 'refs/heads/main' |
| 109 | + uses: actions/upload-release-asset@v1 |
| 110 | + env: |
| 111 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 112 | + with: |
| 113 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 114 | + asset_path: ./outputs/python_${{env.TYPE}}_signed-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.pkg |
| 115 | + asset_name: python_${{env.TYPE}}_signed-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.pkg |
| 116 | + asset_content_type: application/x-newton-compatible-pkg |
| 117 | + |
| 118 | + - name: Upload Python Framework Release Asset |
| 119 | + if: github.ref == 'refs/heads/main' |
| 120 | + uses: actions/upload-release-asset@v1 |
| 121 | + env: |
| 122 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 123 | + with: |
| 124 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 125 | + asset_path: ./outputs/Python3.framework_${{env.TYPE}}-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.zip |
| 126 | + asset_name: Python3.framework_${{env.TYPE}}-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.zip |
| 127 | + asset_content_type: application/zip |
| 128 | + |
| 129 | + - name: Upload packages |
| 130 | + uses: actions/upload-artifact@v2 |
| 131 | + with: |
| 132 | + name: packages |
| 133 | + path: outputs/ |
0 commit comments