From 4dea2d06386eea3ee5391589d2fe48c26db19f7c Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 26 Jul 2024 17:00:03 +1200 Subject: [PATCH] ci: update release.yml --- .github/workflows/release.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 312625b..4f8174b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,23 @@ jobs: if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Extract TS SDK version from index.html + id: extract_ts_sdk_version + run: | + version=$(grep -oP '"x-sdk-version":"ts-immutable-sdk-\K[0-9]+\.[0-9]+\.[0-9]+' ./Web/index.js | head -n 1) + + if [[ -z "$version" ]]; then + echo "Error: Version not found in index.js" >&2 + exit 1 + fi + + version=$(echo "$version" | tr -d '\r\n') + + echo "VERSION=${version}" >> "$GITHUB_ENV" + - name: Build Changelog id: github_release uses: mikepenz/release-changelog-builder-action@v3 @@ -33,6 +50,9 @@ jobs: - name: Create Release uses: mikepenz/action-gh-release@v0.2.0-a03 with: - body: ${{steps.github_release.outputs.changelog}} + body: | + ${{steps.github_release.outputs.changelog}} + + Game bridge built from Immutable Typescript SDK version ${{ env.VERSION }} - \ No newline at end of file +