Skip to content

Commit fcc9dd3

Browse files
authored
build(ci): Fix signing the PHAR (#808)
1 parent e284b10 commit fcc9dd3

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/release.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,22 @@ jobs:
4949
run: bin/php-scoper.phar --version
5050

5151
- name: Import GPG key
52+
if: github.event_name == 'release'
5253
uses: crazy-max/ghaction-import-gpg@v5
5354
with:
5455
gpg_private_key: ${{ secrets.GPG_KEY_74A754C9778AA03AA451D1C1A000F927D67184EE }}
5556
passphrase: ${{ secrets.GPG_KEY_74A754C9778AA03AA451D1C1A000F927D67184EE_PASSPHRASE }}
5657

57-
- name: Sign the PHAR
58-
run: |
59-
gpg --local-user [email protected] \
60-
--batch \
61-
--yes \
62-
--passphrase="${{ secrets.GPG_KEY_74A754C9778AA03AA451D1C1A000F927D67184EE_PASSPHRASE }}"
63-
--detach-sign \
64-
--output bin/php-scoper.phar.asc \
65-
bin/php-scoper.phar
58+
- name: Sign the PHAR
59+
if: github.event_name == 'release'
60+
run: |
61+
gpg --local-user [email protected] \
62+
--batch \
63+
--yes \
64+
--passphrase="${{ secrets.GPG_KEY_74A754C9778AA03AA451D1C1A000F927D67184EE_PASSPHRASE }}" \
65+
--detach-sign \
66+
--output bin/php-scoper.phar.asc \
67+
bin/php-scoper.phar
6668
6769
- name: Upload the PHAR artifact
6870
if: github.event_name == 'release'

0 commit comments

Comments
 (0)