From 17a121335d993807a004c932b1ba459ae93442c6 Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 2 Aug 2024 10:23:01 +1200 Subject: [PATCH] ci: update tag.yml --- .github/workflows/tag.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 35c6c5d7..7122a598 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -28,9 +28,19 @@ jobs: VERSION=$(jq -r .version ./src/Packages/Passport/package.json) echo "VERSION=$VERSION" >> "$GITHUB_ENV" + - name: Check TS SDK version exists in index.html + id: check_ts_sdk_version + run: | + version=$(grep -oP '"x-sdk-version":"ts-immutable-sdk-\K[0-9]+\.[0-9]+\.[0-9]+' ./src/Packages/Passport/Runtime/Resources/index.html | head -n 1) + + if [[ -z "$version" ]]; then + echo "Error: TS SDK version not found in index.html" >&2 + exit 1 + fi + - name: Create Tag uses: negz/create-tag@v1 with: version: "v${{ env.VERSION }}" message: "Version ${{ env.VERSION }}" - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }}