File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,19 @@ jobs:
2626 - name : Checkout code
2727 uses : actions/checkout@v2
2828
29+ - name : Setup GPG
30+ run : |
31+ mkdir -p ~/.gnupg
32+ echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import --yes
33+ echo "use-agent" >> ~/.gnupg/gpg.conf
34+ echo "pinentry-program /usr/bin/pinentry" >> ~/.gnupg/gpg-agent.conf
35+ echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
36+
2937 - name : Create source release
3038 run : |
3139 mkdir -p output
3240 chmod +x tools/releasing/create_source_release.sh
33- OUTPUT_DIR=output tools/releasing/create_source_release.sh
41+ OUTPUT_DIR=output GPG_PASSPHRASE=${{ secrets.GPG_PASSPHRASE }} tools/releasing/create_source_release.sh
3442
3543 - name : Upload source release
3644 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change 1818#
1919
2020# #
21- # # set output directory
21+ # # set build vars
2222# #
2323OUTPUT_DIR=${OUTPUT_DIR}
24+ GPG_PASSPHRASE=${GPG_PASSPHRASE}
2425
2526if [ -z " ${OUTPUT_DIR} " ]; then
2627 echo " OUTPUT_DIR was not set"
2728 exit 1
2829fi
2930
31+ if [ -z " ${GPG_PASSPHRASE} " ]; then
32+ echo " GPG_PASSPHRASE was not set"
33+ exit 1
34+ fi
35+
3036# fail immediately
3137set -o errexit
3238set -o nounset
@@ -88,7 +94,7 @@ cp "dist/${WHEEL_FILE_NAME}" "${OUTPUT_DIR}/${WHEEL_FILE_NAME}"
8894cd ${OUTPUT_DIR}
8995
9096# Sign sha the wheel package
91- gpg --armor --detach-sig ${WHEEL_FILE_NAME}
97+ gpg --batch --yes --pinentry-mode loopback --passphrase=GPG_PASSPHRASE -- armor --detach-sign --armor ${WHEEL_FILE_NAME}
9298$SHASUM ${WHEEL_FILE_NAME} > " ${WHEEL_FILE_NAME} .sha512"
9399
94100rm -rf DEPS_DIR
You can’t perform that action at this time.
0 commit comments