-
Notifications
You must be signed in to change notification settings - Fork 8
60 lines (50 loc) · 1.62 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
name: 'Create Release'
on:
workflow_run:
workflows: ["Tag Release"]
types:
- completed
jobs:
release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Extract TS SDK version from index.js
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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
configurationJson: |
{
"pr_template": "- #{{TITLE}} (##{{NUMBER}})",
"categories": [
{
"title": "## Features",
"labels": ["feature", "feat"]
},
{
"title": "## Fixes",
"labels": ["fix"]
}
]
}
- name: Create Release
uses: mikepenz/[email protected]
with:
body: |
${{steps.github_release.outputs.changelog}}
Game bridge built from Immutable Typescript SDK version ${{ env.VERSION }}