From 5f970a437fc3575dfaac8613756bc76483b455c2 Mon Sep 17 00:00:00 2001 From: Stefan Matting Date: Mon, 15 Apr 2024 17:01:31 +0200 Subject: [PATCH] test certs in build.yaml --- .github/workflows/build.yml | 38 +++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79e8932..988e913 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,14 +10,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - shell: bash + + - name: Import certs + shell: bash + env: + DEVELOPER_ID_APPLICATION_PEM: ${{ secrets.DEVELOPER_ID_APPLICATION_PEM }} + DEV_KEY_P12_B64: ${{ secrets.DEV_KEY_P12_B64 }} + DEV_KEY_P12_W: ${{ secrets.DEV_KEY_P12_W }} run: | - python3 --version - python3 -m venv venv - source venv/bin/activate - pip install -r requirements.txt - pip install -r requirements-stage2.txt - ./scripts/build.sh + set -eo pipefail + echo -n "$DEVELOPER_ID_APPLICATION_PEM" > /tmp/DEVELOPER_ID_APPLICATION_PEM + echo -n "$DEV_KEY_P12_B64" | base64 -d > /tmp/DEV_KEY_P12 + pw=(echo -n "$DEV_KEY_P12_W") + security import /tmp/DEV_KEY_P12 -k $HOME/Library/Keychains/login.keychain -P "$pw" -A "Stefan Dev Key" + security import "$DEVELOPER_ID_APPLICATION_PEM" -k $HOME/Library/Keychains/login.keychain + rm -f /tmp/DEVELOPER_ID_APPLICATION_PEM + rm -f /tmp/DEV_KEY_P12 + echo "succesfully imported" + + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.10' + # - shell: bash + # run: | + # python3 --version + # python3 -m venv venv + # source venv/bin/activate + # pip install -r requirements.txt + # pip install -r requirements-stage2.txt + # ./scripts/build.sh