Update yml

This commit is contained in:
James Chen
2025-03-11 10:47:56 +08:00
parent 3ce6a6603d
commit 1374c7520a
+21 -5
View File
@@ -15,6 +15,9 @@ jobs:
if:
(! contains(github.event.pull_request.body, '[X] does not change any runtime related code or build configuration'))
runs-on: ubuntu-latest
outputs:
SPINE_WASM_UP_TO_DATE_BASE: ${{ steps.check-wasm-up-to-date-base.outputs.SPINE_WASM_UP_TO_DATE_BASE }}
SPINE_WASM_UP_TO_DATE_HEAD: ${{ steps.check-wasm-up-to-date-head.outputs.SPINE_WASM_UP_TO_DATE_HEAD }}
strategy:
fail-fast: false
matrix:
@@ -197,15 +200,28 @@ jobs:
cd ./native/external
git status
- name: Check if spine wasm files are up-to-date
- name: Check if spine wasm files are up-to-date (base)
id: check-wasm-up-to-date-base
if: ${{ matrix.config.target == 'base' }}
run: |
cd ./native/external
diff_output=$(git diff)
if [ -n "$diff_output" ]; then
echo "SPINE_WASM_UP_TO_DATE_BASE=false" >> $GITHUB_ENV
else
echo "SPINE_WASM_UP_TO_DATE_BASE=true" >> $GITHUB_ENV
fi
- name: Check if spine wasm files are up-to-date (head)
id: check-wasm-up-to-date-head
if: ${{ matrix.config.target == 'head' }}
run: |
cd ./native/external
diff_output=$(git diff)
if [ -n "$diff_output" ]; then
echo "SPINE_WASM_UP_TO_DATE=false" >> $GITHUB_ENV
echo "SPINE_WASM_UP_TO_DATE_HEAD=false" >> $GITHUB_ENV
else
echo "SPINE_WASM_UP_TO_DATE=true" >> $GITHUB_ENV
echo "SPINE_WASM_UP_TO_DATE_HEAD=true" >> $GITHUB_ENV
fi
- name: Upload Spine Artifact
@@ -401,9 +417,9 @@ jobs:
needs: dts-and-size
steps:
- name: Check if wasm files are up-to-date
- name: Check if wasm files are up-to-date (head)
run: |
if [ "${{ needs.dts-and-size.outputs.SPINE_WASM_UP_TO_DATE }}" == "true" ]; then
if [ "${{ needs.dts-and-size.outputs.SPINE_WASM_UP_TO_DATE_HEAD }}" == "true" ]; then
echo "Spine WASM files in native/external is up-to-date."
exit 0
else