1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Fix signing

This commit is contained in:
Matthew Brown 2021-01-11 15:15:14 -05:00
parent 74c0bd3c19
commit 51f0c58f3b
2 changed files with 6 additions and 5 deletions

View File

@ -44,8 +44,8 @@ jobs:
- run: bin/build-phar.sh
env:
GPG_SIGNING: 1
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Upload release assets
uses: svenstaro/upload-release-action@v2

View File

@ -11,11 +11,12 @@ php $DIR/improve_class_alias.php
vendor/bin/box compile
if [[ "$GPG_SIGNING" != '' ]] ; then
if [[ "$SIGNING_KEY" != '' ]] ; then
if [[ "$GPG_SECRET_KEY" != '' ]] ; then
echo "Load secret key into gpg"
echo "$SIGNING_KEY" | gpg --import --no-tty --batch --yes
echo "$GPG_SECRET_KEY" | gpg --import --no-tty --batch --yes
fi
echo "Sign Phar"
gpg --command-fd 0 --pinentry-mode loopback -u 12CE0F1D262429A5 --batch --detach-sign --armor --output build/psalm.phar.asc build/psalm.phar
ECHO "$GPG_PASSPHRASE" | gpg --command-fd 0 --passphrase-fd 0 --pinentry-mode loopback -u 12CE0F1D262429A5 --batch --detach-sign --armor --output build/psalm.phar.asc build/psalm.phar
fi