Skip to content

Commit 7addbf6

Browse files
cynthiajoanCynthia Jiang
andauthored
Prepare sha for tgz (#236)
* calculate hash for tgzs * don't need basename * append hash instead of over write * correct the location * make warning message clear Co-authored-by: Cynthia Jiang <[email protected]>
1 parent b4d65a2 commit 7addbf6

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/package.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,9 @@ jobs:
176176
- name: compute SDK hash
177177
shell: bash
178178
run: |
179-
${{ env.hashCommand }} --tag firebase_unity_sdk.zip > firebase_unity_sdk_hash.txt
179+
${{ env.hashCommand }} --tag firebase_unity_sdk.zip >> firebase_unity_sdk_hash.txt
180180
echo "::warning ::$(cat firebase_unity_sdk_hash.txt)"
181181
182-
- name: upload hash
183-
uses: actions/[email protected]
184-
with:
185-
name: firebase_unity_sdk_hash.txt
186-
path: firebase_unity_sdk_hash.txt
187-
188182
- name: Upload Build unitypackage
189183
uses: actions/upload-artifact@v2
190184
with:
@@ -200,12 +194,28 @@ jobs:
200194
ls -Rl
201195
working-directory: output_tgz
202196

197+
- name: compute SDK hash for tgz files
198+
shell: bash
199+
run: |
200+
tgz_files_list=$(find -type f -name '*.tgz')
201+
for tgz_file in "${tgz_files_list[@]}"; do
202+
${{ env.hashCommand }} --tag ${tgz_file} >> ../firebase_unity_sdk_hash.txt
203+
done
204+
echo "::warning update sha txt \n ::$(cat ../firebase_unity_sdk_hash.txt)"
205+
working-directory: output_tgz
206+
203207
- name: Upload Build tgz
204208
uses: actions/upload-artifact@v2
205209
with:
206210
name: firebase_unity_sdk_tgz
207211
path: output_tgz
208212

213+
- name: upload hash
214+
uses: actions/[email protected]
215+
with:
216+
name: firebase_unity_sdk_hash.txt
217+
path: firebase_unity_sdk_hash.txt
218+
209219
trigger_integration_tests:
210220
# Trigger the integration_tests workflow.
211221
needs: [package_sdks]

0 commit comments

Comments
 (0)