Skip to content

Commit 4dea2d0

Browse files
authored
ci: update release.yml
1 parent da49d22 commit 4dea2d0

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@ jobs:
1010
if: startsWith(github.ref, 'refs/tags/')
1111
runs-on: ubuntu-latest
1212
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Extract TS SDK version from index.html
17+
id: extract_ts_sdk_version
18+
run: |
19+
version=$(grep -oP '"x-sdk-version":"ts-immutable-sdk-\K[0-9]+\.[0-9]+\.[0-9]+' ./Web/index.js | head -n 1)
20+
21+
if [[ -z "$version" ]]; then
22+
echo "Error: Version not found in index.js" >&2
23+
exit 1
24+
fi
25+
26+
version=$(echo "$version" | tr -d '\r\n')
27+
28+
echo "VERSION=${version}" >> "$GITHUB_ENV"
29+
1330
- name: Build Changelog
1431
id: github_release
1532
uses: mikepenz/release-changelog-builder-action@v3
@@ -33,6 +50,9 @@ jobs:
3350
- name: Create Release
3451
uses: mikepenz/[email protected]
3552
with:
36-
body: ${{steps.github_release.outputs.changelog}}
53+
body: |
54+
${{steps.github_release.outputs.changelog}}
55+
56+
Game bridge built from Immutable Typescript SDK version ${{ env.VERSION }}
3757
38-
58+

0 commit comments

Comments
 (0)