Skip to content

Commit 5b7cf79

Browse files
authored
Merge pull request #1130 from PHPCSStandards/feature/update-gpg-key-info
Update for new GPG keys
2 parents 1b71b4d + deb36e2 commit 5b7cf79

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

.github/release-checklist.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@
88
- [ ] Verify that any new functions have type declarations (ClassName/array/callable) whenever possible.
99
- [ ] Verify that the license tags all refer to the _new_ organisation and no longer to Squizlabs. (easily overlooked in new files)
1010
- [ ] Verify that `@copyright` tags in new files use `@copyright 20xx PHPCSStandards and contributors`.
11+
- [ ] Check if the GPG key is still valid (not expired).
12+
If it has expired, create a new key before starting the release process.
13+
- Generate a new key following the steps here: <https://phar.io/howto/generate-gpg-key.html>.
14+
- Upload the new key following the steps here: <https://phar.io/howto/uploading-public-keys.html>.
15+
:warning: the command for exporting the key will export _all_ keys for the email address. This will not work as OpenPGP does not send an email to verify the key if the upload contained multiple keys.
16+
So, first run `gpg --keyid-format LONG --list-keys my@email.com`.
17+
Then run `gpg --export --armor KEY_ID > phpcs.pub` specifically for the new key.
18+
And then upload the file.
19+
- Verify the key via the link received via email.
20+
- Update the key information in the README x 3.
21+
- Update the key info in the verify-release GHA workflow x 2.
1122

1223
### Wiki
1324

@@ -77,11 +88,6 @@ Please consider [funding the PHP_CodeSniffer project](https://opencollective.com
7788
gpg -u my@email.com --detach-sign --output phpcs-x.x.x.phar.asc phpcs-x.x.x.phar
7889
gpg -u my@email.com --detach-sign --output phpcbf-x.x.x.phar.asc phpcbf-x.x.x.phar
7990
```
80-
- If, for whatever reason, the key is no longer available or has expired:
81-
-> generate a new key following the steps here: <https://phar.io/howto/generate-gpg-key.html>.
82-
-> upload the new key following the steps here: <https://phar.io/howto/uploading-public-keys.html>.
83-
-> update the key information in the README x 3.
84-
-> update the key info in the verify-release GHA workflow.
8591
- [ ] Get the SHA of the files for the phive.xml file
8692
```bash
8793
# Linux

.github/workflows/verify-release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,16 @@ jobs:
113113
GH_TOKEN: ${{ github.token }}
114114
GH_FORCE_TTY: true
115115

116-
- name: Download public key
116+
- name: Download public key (May 2024)
117117
env:
118118
FINGERPRINT: "0x689DAD778FF08760E046228BA978220305CD5C32"
119119
run: gpg --keyserver "hkps://keys.openpgp.org" --recv-keys "$FINGERPRINT"
120120

121+
- name: Download public key (June 2025)
122+
env:
123+
FINGERPRINT: "0xD91D86963AF3A29B6520462297B02DD8E5071466"
124+
run: gpg --keyserver "hkps://keys.openpgp.org" --recv-keys "$FINGERPRINT"
125+
121126
- name: Verify signature of the PHAR file
122127
run: gpg --verify ${{ steps.source.outputs.FILE }}.asc ${{ steps.source.outputs.FILE }}
123128

@@ -200,7 +205,9 @@ jobs:
200205
tools: phive
201206

202207
- name: Install
203-
run: phive install ${{ matrix.pharfile }} --copy --trust-gpg-keys 689DAD778FF08760E046228BA978220305CD5C32
208+
run: >
209+
phive install ${{ matrix.pharfile }} --copy
210+
--trust-gpg-keys 689DAD778FF08760E046228BA978220305CD5C32,D91D86963AF3A29B6520462297B02DD8E5071466
204211
205212
- name: "DEBUG: List files"
206213
run: ls -R

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ php phpcbf.phar -h
4848
```
4949

5050
These Phars are signed with the official Release key for PHPCS with the
51-
fingerprint `689D AD77 8FF0 8760 E046 228B A978 2203 05CD 5C32`.
51+
fingerprint `D91D 8696 3AF3 A29B 6520 4622 97B0 2DD8 E507 1466`.
5252

5353
As of PHP_CodeSniffer 3.10.3, the provenance of PHAR files associated with a release can be verified via [GitHub Artifact Attestations](https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds) using the [GitHub CLI tool](https://cli.github.com/) with the following command: `gh attestation verify [phpcs|phpcbf].phar -o PHPCSStandards`.
5454

@@ -78,8 +78,8 @@ You will then be able to run PHP_CodeSniffer from the vendor bin directory:
7878
### Phive
7979
If you use Phive, you can install PHP_CodeSniffer as a project tool using the following commands:
8080
```bash
81-
phive install --trust-gpg-keys 689DAD778FF08760E046228BA978220305CD5C32 phpcs
82-
phive install --trust-gpg-keys 689DAD778FF08760E046228BA978220305CD5C32 phpcbf
81+
phive install --trust-gpg-keys D91D86963AF3A29B6520462297B02DD8E5071466 phpcs
82+
phive install --trust-gpg-keys D91D86963AF3A29B6520462297B02DD8E5071466 phpcbf
8383
```
8484
You will then be able to run PHP_CodeSniffer from the `tools` directory:
8585
```bash

0 commit comments

Comments
 (0)