Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c4c7e1

Browse files
committed
chore(ci): fix ASC private key decoding in release workflow
- Use decoded PEM with a trailing newline for ASC_PRIVATE_KEY - Update step to ensure EOF delimiter is on a new line
1 parent 287b9d7 commit 1c4c7e1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/appstore-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,16 @@ jobs:
143143
- name: Setup ASC credentials
144144
# Decode the base64-encoded .p8 key into raw PEM that asc CLI expects via ASC_PRIVATE_KEY.
145145
# Setting all three vars in $GITHUB_ENV avoids repeating them in every asc step.
146+
# printf '%s\n' guarantees a trailing newline so the EOF delimiter is on its own line.
146147
env:
147148
ASC_PRIVATE_KEY_B64: ${{ secrets.APP_STORE_CONNECT_API_KEY_P8 }}
148149
run: |
149150
echo "ASC_KEY_ID=${{ secrets.APP_STORE_CONNECT_KEY_ID }}" >> $GITHUB_ENV
150151
echo "ASC_ISSUER_ID=${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}" >> $GITHUB_ENV
152+
DECODED_KEY=$(echo "$ASC_PRIVATE_KEY_B64" | base64 -D)
151153
{
152154
echo 'ASC_PRIVATE_KEY<<EOF'
153-
echo "$ASC_PRIVATE_KEY_B64" | base64 --decode
155+
printf '%s\n' "$DECODED_KEY"
154156
echo 'EOF'
155157
} >> $GITHUB_ENV
156158

0 commit comments

Comments
 (0)