File tree 2 files changed +19
-0
lines changed 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 55
55
id : ver
56
56
run : echo "VER=${GITHUB_REF_NAME#'release/'}" >> $GITHUB_OUTPUT
57
57
58
+ # First generate release.sha512sum which contains hashes of all release files, then
59
+ # encrypt these hashes so that the hash file itself cannot be tampered with.
60
+ - name : Generate release hashes (encrypted)
61
+ run : |
62
+ cd pygame-wheels
63
+ sha512sum * > release.sha512sum
64
+ gpg --batch --output release.sha512sum.gpg --passphrase ${{ secrets.GITHUB_TOKEN }} --symmetric release.sha512sum
65
+
58
66
- name : Draft a release
59
67
uses : softprops/action-gh-release@v2
60
68
with :
Original file line number Diff line number Diff line change 23
23
zipBall : false
24
24
out-file-path : " dist"
25
25
26
+ # Check that all the files that successfully uploaded from the release-gh-draft
27
+ # action have not been tampered with. This however ignores any extra files that
28
+ # were manually added.
29
+ - name : Verify release hashes
30
+ run : |
31
+ cd dist
32
+ gpg --batch --output release.decrypted.sha512sum --passphrase ${{ secrets.GITHUB_TOKEN }} --decrypt release.sha512sum.gpg
33
+ diff -s release.sha512sum release.decrypted.sha512sum
34
+ sha512sum -c release.decrypted.sha512sum
35
+ rm release.*
36
+
26
37
- name : Publish to PyPI
27
38
uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments