Skip to content

Commit dd97ea1

Browse files
committed
make a bunch of changes to the build process
1 parent 1609c12 commit dd97ea1

9 files changed

Lines changed: 291 additions & 287 deletions

.github/workflows/build_python_3.10.x.yml

Lines changed: 0 additions & 145 deletions
This file was deleted.
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Build and upload recommended package
2+
3+
env:
4+
TYPE: "recommended"
5+
DEV_INSTALLER_ID: "Developer ID Installer: Clever DevOps Co. (9GQZ7KUFR6)"
6+
DEV_APPLICATION_ID: "Developer ID Application: Clever DevOps Co. (9GQZ7KUFR6)"
7+
NOTARY_PASS: ${{ secrets.NOTARY_PASS }}
8+
PYTHON_VERSION: "3.10.9"
9+
10+
on:
11+
pull_request:
12+
push:
13+
branches:
14+
- main
15+
paths-ignore:
16+
- '**/README.md'
17+
18+
jobs:
19+
build:
20+
runs-on: macos-12
21+
22+
steps:
23+
- name: Checkout python repo
24+
uses: actions/checkout@v2
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Install Apple Developer ID Application certificates
29+
uses: ssrobins/import-codesign-certs@04ce695a5e6002f1971a8ed78fedd676318f950f # Move back to apple-actions/import-codesign-certs when merged
30+
with:
31+
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
32+
p12-file-base64: ${{ secrets.DEV_APP_CERTIFICATES_P12 }}
33+
p12-password: ${{ secrets.DEV_APP_CERTIFICATES_P12_PASSWORD }}
34+
35+
- name: Install Apple Developer ID Installer certificates
36+
uses: ssrobins/import-codesign-certs@04ce695a5e6002f1971a8ed78fedd676318f950f # Move back to apple-actions/import-codesign-certs when merged
37+
with:
38+
create-keychain: false # do not create a new keychain for this value
39+
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
40+
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
41+
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
42+
43+
- name: Run build package script
44+
run: ./build_python_framework_pkgs.zsh "$TYPE" "$DEV_INSTALLER_ID" "$DEV_APPLICATION_ID" "$PYTHON_VERSION" "${NOTARY_PASS}"
45+
46+
- name: get environment variables
47+
id: get_env_var
48+
run: |
49+
echo "PYTHON_BUILD_VERSION=$(/bin/cat ./build_info.txt)" >> $GITHUB_ENV
50+
51+
- name: Generate changelog
52+
id: changelog
53+
uses: metcalfc/changelog-generator@31b6d6f9e6e17e84ad34bee780f82d8ee79f6842 # v4.0.1
54+
with:
55+
myToken: ${{ secrets.GITHUB_TOKEN }}
56+
reverse: 'true'
57+
58+
- name: Create Release
59+
id: create_release
60+
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
61+
with:
62+
name: Python ${{env.PYTHON_BUILD_VERSION}}
63+
tag_name: v${{env.PYTHON_BUILD_VERSION}}
64+
draft: false
65+
prerelease: true
66+
token: ${{ secrets.GITHUB_TOKEN }}
67+
body: |
68+
# Notes
69+
Python ${{env.PYTHON_VERSION}} Framework
70+
71+
## Changes
72+
- Upgraded Python to 3.10.9
73+
**Note: Some of these updates may have breaking changes. Always test your code before deploying to production!**
74+
75+
Please see the `requirements_recommended.txt` for the current libraries being used.
76+
77+
${{ steps.changelog.outputs.changelog }}
78+
79+
# Flavors of Python
80+
At this time, the automated build process will **only** create the Recommended package
81+
82+
## Recommended
83+
This is a Python.framework that contains everything from minimal, and a few libraries that various well known open source projects require.
84+
85+
## Signing/Notarization
86+
The signed package is fully notarized, including the Python.framework file
87+
files: ${{github.workspace}}/outputs/*.pkg
88+
89+
- name: Upload packages
90+
uses: actions/upload-artifact@v3.1.1
91+
with:
92+
name: packages
93+
path: outputs/
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Build and upload recommended package
2+
3+
env:
4+
TYPE: "recommended"
5+
DEV_INSTALLER_ID: "Developer ID Installer: Clever DevOps Co. (9GQZ7KUFR6)"
6+
DEV_APPLICATION_ID: "Developer ID Application: Clever DevOps Co. (9GQZ7KUFR6)"
7+
NOTARY_PASS: ${{ secrets.NOTARY_PASS }}
8+
PYTHON_VERSION: "3.11.1"
9+
10+
on:
11+
pull_request:
12+
push:
13+
branches:
14+
- main
15+
paths-ignore:
16+
- '**/README.md'
17+
18+
jobs:
19+
build:
20+
runs-on: macos-12
21+
22+
steps:
23+
- name: Checkout python repo
24+
uses: actions/checkout@v2
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Install Apple Developer ID Application certificates
29+
uses: ssrobins/import-codesign-certs@04ce695a5e6002f1971a8ed78fedd676318f950f # Move back to apple-actions/import-codesign-certs when merged
30+
with:
31+
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
32+
p12-file-base64: ${{ secrets.DEV_APP_CERTIFICATES_P12 }}
33+
p12-password: ${{ secrets.DEV_APP_CERTIFICATES_P12_PASSWORD }}
34+
35+
- name: Install Apple Developer ID Installer certificates
36+
uses: ssrobins/import-codesign-certs@04ce695a5e6002f1971a8ed78fedd676318f950f # Move back to apple-actions/import-codesign-certs when merged
37+
with:
38+
create-keychain: false # do not create a new keychain for this value
39+
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
40+
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
41+
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
42+
43+
- name: Run build package script
44+
run: ./build_python_framework_pkgs.zsh "$TYPE" "$DEV_INSTALLER_ID" "$DEV_APPLICATION_ID" "$PYTHON_VERSION" "${NOTARY_PASS}"
45+
46+
- name: get environment variables
47+
id: get_env_var
48+
run: |
49+
echo "PYTHON_BUILD_VERSION=$(/bin/cat ./build_info.txt)" >> $GITHUB_ENV
50+
51+
- name: Generate changelog
52+
id: changelog
53+
uses: metcalfc/changelog-generator@31b6d6f9e6e17e84ad34bee780f82d8ee79f6842 # v4.0.1
54+
with:
55+
myToken: ${{ secrets.GITHUB_TOKEN }}
56+
reverse: 'true'
57+
58+
- name: Create Release
59+
id: create_release
60+
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
61+
with:
62+
name: Python ${{env.PYTHON_BUILD_VERSION}}
63+
tag_name: v${{env.PYTHON_BUILD_VERSION}}
64+
draft: false
65+
prerelease: true
66+
token: ${{ secrets.GITHUB_TOKEN }}
67+
body: |
68+
# Notes
69+
Python ${{env.PYTHON_VERSION}} Framework
70+
71+
## Changes
72+
- Upgraded Python to 3.11.1
73+
**Note: Some of these updates may have breaking changes. Always test your code before deploying to production!**
74+
75+
Please see the `requirements_recommended.txt` for the current libraries being used.
76+
77+
${{ steps.changelog.outputs.changelog }}
78+
79+
# Flavors of Python
80+
At this time, the automated build process will **only** create the Recommended package
81+
82+
## Recommended
83+
This is a Python.framework that contains everything from minimal, and a few libraries that various well known open source projects require.
84+
85+
## Signing/Notarization
86+
The signed package is fully notarized, including the Python.framework file
87+
files: ${{github.workspace}}/outputs/*.pkg
88+
89+
- name: Upload packages
90+
uses: actions/upload-artifact@v3.1.1
91+
with:
92+
name: packages
93+
path: outputs/

0 commit comments

Comments
 (0)