Skip to content

Commit 984fbcf

Browse files
committed
Save checksum to phpstan-dist
1 parent c0074f1 commit 984fbcf

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/phar.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
runs-on: "ubuntu-latest"
2121
timeout-minutes: 60
2222

23+
outputs:
24+
checksum: ${{ steps.checksum.outputs.md5 }}
25+
2326
steps:
2427
- name: "Checkout"
2528
uses: "actions/checkout@v2"
@@ -50,6 +53,19 @@ jobs:
5053
working-directory: "compiler"
5154
run: "php bin/prepare"
5255

56+
- name: "Compile PHAR for checksum"
57+
working-directory: "compiler/build"
58+
run: "php box.phar compile --no-parallel"
59+
env:
60+
PHAR_CHECKSUM: "1"
61+
62+
- name: "Save checksum"
63+
id: "checksum"
64+
run: echo "::set-output name=md5::$(md5sum tmp/phpstan.phar)"
65+
66+
- name: "Delete checksum PHAR"
67+
run: "rm tmp/phpstan.phar"
68+
5369
- name: "Compile PHAR"
5470
working-directory: "compiler/build"
5571
run: "php box.phar compile --no-parallel"
@@ -117,6 +133,9 @@ jobs:
117133
- name: "cp PHAR"
118134
run: cp tmp/phpstan.phar phpstan-dist/phpstan.phar
119135

136+
- name: "Update checksum"
137+
run: echo ${{needs.compiler-tests.outputs.checksum}} > phpstan-dist/.phar-checksum
138+
120139
- name: "Sign PHAR"
121140
working-directory: phpstan-dist
122141
run: rm phpstan.phar.asc && gpg --command-fd 0 --pinentry-mode loopback -u "$GPG_ID" --batch --detach-sign --armor --output phpstan.phar.asc phpstan.phar

0 commit comments

Comments
 (0)