44 workflow_dispatch :
55 inputs :
66 version :
7- description : " Version number "
7+ description : " New version for the SDKs in the format of M.m.p "
88 required : true
99 type : string
1010 build_number :
11- description : " Build number "
11+ description : " New build number for the SDKs in the format of Mmmppbb "
1212 required : true
1313 type : string
1414
1515jobs :
1616 prepare-release :
1717 runs-on : ubuntu-latest
1818 if : startsWith(github.ref, 'refs/heads/sdk-core/') # Only run on branches that start with sdk-core/
19+ env :
20+ VERSION : ${{ github.event.inputs.version }}
21+ BUILD_NUMBER : ${{ github.event.inputs.build_number }}
1922 steps :
2023 - name : Checkout the code
2124 uses : actions/checkout@v4
@@ -28,22 +31,11 @@ jobs:
2831 git_user_signingkey : true
2932 git_commit_gpgsign : true
3033
31- - name : Parse and Validate Inputs
32- run : |
33- # Get inputs passed to the workflow
34- VERSION="${{ github.event.inputs.version }}"
35- BUILD_NUMBER="${{ github.event.inputs.build_number }}"
36-
37- # Save the parsed values for future steps
38- echo "VERSION=$VERSION" >> $GITHUB_ENV
39- echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV
40- shell : bash
41-
4234 - name : Run the Prep Release Script
4335 env :
4436 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4537 run : |
46- make prep-release VERSION="$VERSION " BUILD_NUMBER="$BUILD_NUMBER "
38+ make prep-release VERSION="{{ env.SDK_VERSION }} " BUILD_NUMBER="{{ env.SDK_BUILD_NUMBER }} "
4739 shell : bash
4840
4941 build-wheels :
5244 if : startsWith(github.ref, 'refs/heads/sdk-core/')
5345 needs : [prepare-release]
5446 strategy :
47+ # we don't want all of them failing if one fails
5548 fail-fast : false
5649 matrix :
5750 # macOS 13 is an Intel runner and macOS 14 is an Apple Silicon runner
@@ -75,17 +68,24 @@ jobs:
7568
7669 - name : Build wheels
7770 env :
71+ # Skip all the unneeded images like PyPy and musllinux images
7872 CIBW_SKIP : pp* *-musllinux_*
73+ # Set the manylinux X86_64/aarch64 image to this specific 2.34 image
7974 CIBW_MANYLINUX_X86_64_IMAGE : " quay.io/pypa/manylinux_2_34_x86_64"
8075 CIBW_MANYLINUX_AARCH64_IMAGE : " quay.io/pypa/manylinux_2_34_aarch64"
76+ # Set the wheel to the native archtiecture (output of platform.machine() which we use in the setup.py script)
8177 CIBW_ARCHS : " native"
78+ # Windows reparing of wheels are not supported so manually install it.
8279 CIBW_BEFORE_BUILD_WINDOWS : " pip install delvewheel"
8380 CIBW_REPAIR_WHEEL_COMMAND_WINDOWS : " delvewheel repair -w {dest_dir} {wheel}"
81+ # Dependencies required for testing each wheel
8482 CIBW_TEST_REQUIRES : " pydantic pytest pytest-asyncio"
83+ # The minimum MacOS version for darwin wheels (matches OPH)
8584 MACOSX_DEPLOYMENT_TARGET : " 12.0"
85+ # The command to test every wheel
8686 CIBW_TEST_COMMAND : " python -m pytest {project}/src/onepassword/test_client.py"
87- OP_SERVICE_ACCOUNT_TOKEN : ${{ secrets.TEST_SERVICE_ACCOUNT_TOKEN }}
88- CIBW_ENVIRONMENT_PASS_LINUX : OP_SERVICE_ACCOUNT_TOKEN # We have to specify this to pass the token to the test command
87+ # Pass the service account token in all wheel buildings for testing of the wheels.
88+ CIBW_ENVIRONMENT : OP_SERVICE_ACCOUNT_TOKEN=${{ secrets.TEST_SERVICE_ACCOUNT_TOKEN }}
8989 run : |
9090 python -m cibuildwheel --output-dir dist
9191
0 commit comments