Skip to content

Commit cdff060

Browse files
authored
Release 2.13.3
1 parent 39ef5dd commit cdff060

File tree

177 files changed

+1835
-955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+1835
-955
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: PushOk (Develop PR Merge)
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
types:
8+
- closed
9+
10+
jobs:
11+
call-reusable:
12+
if: ${{ github.event.pull_request.merged == true }}
13+
uses: ./.github/workflows/distribute-reusable.yml
14+
with:
15+
branch: ${{ github.base_ref }}
16+
secrets: inherit
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: PushOk Distribute manual
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
call-reusable:
8+
uses: ./.github/workflows/distribute-reusable.yml
9+
with:
10+
branch: ${{ github.ref_name }}
11+
secrets: inherit
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Distribute PushOk (Release/Support PR)
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- support/*
8+
- mission/*
9+
types:
10+
- opened
11+
- synchronize
12+
13+
jobs:
14+
call-reusable:
15+
if: ${{ startsWith(github.event.pull_request.head.ref, 'release/') }}
16+
uses: ./.github/workflows/distribute-reusable.yml
17+
secrets: inherit
18+
with:
19+
branch: ${{ github.event.pull_request.head.ref }}
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
name: Distribute PushOk
1+
name: PushOk - Reusable
22

33
on:
4-
pull_request:
5-
types: [ closed ]
6-
branches:
7-
- develop
8-
push:
9-
branches:
10-
- 'release/*'
11-
- 'support/*'
4+
workflow_call:
5+
inputs:
6+
branch:
7+
required: true
8+
type: string
129

1310
jobs:
1411
distribution:
15-
if: github.event.pull_request.merged == true || (github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/support/')))
1612
runs-on: ubuntu-latest
1713
steps:
1814
- name: Checkout repository
1915
uses: actions/checkout@v4
16+
with:
17+
ref: ${{ inputs.branch }}
2018

2119
- name: Get last 3 commit messages
2220
run: |
@@ -28,5 +26,5 @@ jobs:
2826
curl --location 'https://mindbox.gitlab.yandexcloud.net/api/v4/projects/900/trigger/pipeline' \
2927
--form 'token="${{ secrets.GITLAB_TRIGGER_TOKEN }}"' \
3028
--form 'ref="develop"' \
31-
--form "variables[INPUT_BRANCH]=\"${{ github.head_ref || github.ref_name }}\"" \
29+
--form "variables[INPUT_BRANCH]=\"${{ inputs.branch }}\"" \
3230
--form "variables[INPUT_COMMITS]=\"${{ env.commits }}\""
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: "Manual Release Prep: Branch & Version Bump"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_version:
7+
description: 'Release version (e.g. 1.2.3 or 1.2.3-rc)'
8+
required: true
9+
source_branch:
10+
description: 'Create branch from'
11+
required: true
12+
default: 'develop'
13+
target_branch:
14+
description: 'Pull Request to'
15+
required: true
16+
default: 'master'
17+
18+
jobs:
19+
validate-input:
20+
name: Validate release_version format
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Check version matches semver or semver-rc
24+
run: |
25+
VER="${{ github.event.inputs.release_version }}"
26+
echo "→ release_version = $VER"
27+
if ! [[ "$VER" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-rc)?$ ]]; then
28+
echo "❌ release_version must be X.Y.Z or X.Y.Z-rc"
29+
exit 1
30+
fi
31+
32+
validate-branches:
33+
name: Validate branch names
34+
runs-on: ubuntu-latest
35+
needs: validate-input
36+
steps:
37+
- name: Checkout minimal repo
38+
uses: actions/checkout@v4
39+
with:
40+
fetch-depth: 0
41+
42+
- name: Validate source branch exists
43+
run: |
44+
SRC="${{ github.event.inputs.source_branch }}"
45+
if ! git ls-remote --heads origin "$SRC" | grep -q "$SRC"; then
46+
echo "❌ source_branch '$SRC' does not exist on origin"
47+
exit 1
48+
fi
49+
50+
- name: Validate target branch exists
51+
run: |
52+
DST="${{ github.event.inputs.target_branch }}"
53+
if ! git ls-remote --heads origin "$DST" | grep -q "$DST"; then
54+
echo "❌ target_branch '$DST' does not exist on origin"
55+
exit 1
56+
fi
57+
58+
bump_and_branch:
59+
name: Create release branch & bump version
60+
runs-on: ubuntu-latest
61+
needs: validate-branches
62+
outputs:
63+
release_branch: ${{ steps.bump.outputs.release_branch }}
64+
steps:
65+
- name: Checkout source branch
66+
uses: actions/checkout@v4
67+
with:
68+
ref: ${{ github.event.inputs.source_branch }}
69+
fetch-depth: 0
70+
71+
- name: Configure Git identity for GitHub Action Bot
72+
run: |
73+
git config user.name "github-actions[bot]"
74+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
75+
76+
- name: Create release branch & bump version
77+
id: bump
78+
run: |
79+
VERSION="${{ github.event.inputs.release_version }}"
80+
SRC="${{ github.event.inputs.source_branch }}"
81+
REL="release/$VERSION"
82+
83+
echo "→ Branching from $SRC into $REL"
84+
git checkout -b "$REL"
85+
86+
echo "→ Running bump script on $REL"
87+
./.github/bump_versions_in_release_branch.sh "$VERSION"
88+
89+
echo "release_branch=$REL" >> $GITHUB_OUTPUT
90+
91+
- name: Push release branch
92+
run: |
93+
git push origin "${{ steps.bump.outputs.release_branch }}"
94+
95+
check_sdk_version:
96+
name: Check SDK Version
97+
runs-on: ubuntu-latest
98+
needs: bump_and_branch
99+
steps:
100+
- name: Checkout the release branch
101+
uses: actions/checkout@v4
102+
with:
103+
ref: ${{ needs.bump_and_branch.outputs.release_branch }}
104+
fetch-depth: 0
105+
106+
- name: Pull latest changes
107+
run: git pull
108+
109+
- name: Validate sdkVersion
110+
run: |
111+
EXPECT="${{ github.event.inputs.release_version }}"
112+
SDK_VERSION=$(grep -E '^SDK_VERSION_NAME=' gradle.properties | cut -d'=' -f2)
113+
echo "→ Found in code: $SDK_VERSION, expected: $EXPECT"
114+
if [ "$SDK_VERSION" != "$EXPECT" ]; then
115+
echo "❌ SDK version does not match!"
116+
exit 1
117+
fi
118+
119+
create_pull_request:
120+
name: Create Pull Request
121+
runs-on: ubuntu-latest
122+
needs: [bump_and_branch, check_sdk_version]
123+
steps:
124+
- name: Create PR via GitHub CLI
125+
env:
126+
GH_TOKEN: ${{ secrets.PAT_FOR_TRIGGERING_BRANCH_PROTECTION }}
127+
SRC: ${{ needs.bump_and_branch.outputs.release_branch }}
128+
DST: ${{ github.event.inputs.target_branch }}
129+
REPO: ${{ github.repository }}
130+
run: |
131+
echo "→ Creating PR from $SRC into $DST"
132+
gh pr create \
133+
--repo "$REPO" \
134+
--base "$DST" \
135+
--head "$SRC" \
136+
--title "Release ${{ github.event.inputs.release_version }}" \
137+
--body "Updates the release version to ${{ github.event.inputs.release_version }}. Automated PR: merge $SRC into $DST"

.github/workflows/prepare_release_branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@ jobs:
8989
PR_URL=$(gh pr view --json url --jq '.url')
9090
echo "PR_URL=$PR_URL" >> $GITHUB_ENV
9191
env:
92-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92+
GH_TOKEN: ${{ secrets.PAT_FOR_TRIGGERING_BRANCH_PROTECTION }}
9393

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: SDK publish from master or support branch
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
branches:
7+
- 'master'
8+
- 'support/*'
9+
10+
jobs:
11+
call-reusable:
12+
if: ${{ github.event.pull_request.merged == true }}
13+
uses: ./.github/workflows/publish-reusable.yml
14+
with:
15+
branch: ${{ github.base_ref }}
16+
secrets: inherit
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: SDK publish manual
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
check-branch:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check if branch matches pattern
11+
run: |
12+
if ! echo "${{ github.ref_name }}" | grep -q "release/.*-rc"; then
13+
echo "Branch name must match pattern 'release/*-rc' (e.g. release/2.13.2-rc)"
14+
exit 1
15+
fi
16+
17+
call-publish-reusable:
18+
needs: check-branch
19+
uses: ./.github/workflows/publish-reusable.yml
20+
with:
21+
branch: ${{ github.ref_name }}
22+
secrets: inherit

.github/workflows/publish.yml renamed to .github/workflows/publish-reusable.yml

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
name: SDK publish
22

33
on:
4-
pull_request:
5-
types: [closed]
6-
branches:
7-
- 'master'
8-
- 'support/*'
4+
workflow_call:
5+
inputs:
6+
branch:
7+
required: true
8+
type: string
99

1010
jobs:
1111
lint:
12-
if: github.event.pull_request.merged == true
1312
runs-on: ubuntu-latest
1413
steps:
1514
- uses: actions/checkout@v4
15+
with:
16+
ref: ${{ inputs.branch }}
1617

1718
- name: Set up JDK 17
1819
uses: actions/setup-java@v3
@@ -29,6 +30,8 @@ jobs:
2930
runs-on: ubuntu-latest
3031
steps:
3132
- uses: actions/checkout@v4
33+
with:
34+
ref: ${{ inputs.branch }}
3235

3336
- name: Set up JDK 17
3437
uses: actions/setup-java@v3
@@ -46,6 +49,8 @@ jobs:
4649
runs-on: ubuntu-latest
4750
steps:
4851
- uses: actions/checkout@v4
52+
with:
53+
ref: ${{ inputs.branch }}
4954

5055
- name: Set up JDK 17
5156
uses: actions/setup-java@v3
@@ -61,6 +66,8 @@ jobs:
6166
runs-on: ubuntu-latest
6267
steps:
6368
- uses: actions/checkout@v4
69+
with:
70+
ref: ${{ inputs.branch }}
6471
- name: Extract SDK version
6572
run: |
6673
SDK_VERSION=$(grep '^SDK_VERSION_NAME=' gradle.properties | cut -d '=' -f2)
@@ -76,6 +83,8 @@ jobs:
7683
runs-on: ubuntu-latest
7784
steps:
7885
- uses: actions/checkout@v4
86+
with:
87+
ref: ${{ inputs.branch }}
7988
- name: Set up JDK 17
8089
uses: actions/setup-java@v3
8190
with:
@@ -104,14 +113,18 @@ jobs:
104113
runs-on: ubuntu-latest
105114
steps:
106115
- uses: actions/checkout@v4
116+
with:
117+
ref: ${{ inputs.branch }}
107118
- name: Github Release generation
108119
run: ./.github/git-release-ci.sh
109120
env:
110121
GH_TOKEN: ${{ github.token }}
111122

112123
merge:
113124
needs: [publish]
114-
if: startsWith(github.head_ref, 'release/')
125+
if: |
126+
startsWith(github.head_ref, 'release') &&
127+
github.base_ref == 'master'
115128
runs-on: ubuntu-latest
116129
steps:
117130
- name: Checkout develop branch
@@ -128,3 +141,21 @@ jobs:
128141
gh pr merge $pr_number --merge
129142
env:
130143
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144+
145+
message-to-loop-if-success:
146+
needs: [release-github]
147+
runs-on: ubuntu-latest
148+
steps:
149+
- name: Send message to LOOP
150+
env:
151+
LOOP_NOTIFICATION_WEBHOOK_URL: ${{ secrets.LOOP_NOTIFICATION_WEBHOOK_URL }}
152+
VERSION: ${{ github.ref_name }}
153+
run: |
154+
MESSAGE=$(cat <<EOF
155+
{
156+
"text": "**🤖 Android release was successful. Version: ${VERSION}**"
157+
}
158+
EOF)
159+
curl -X POST "$LOOP_NOTIFICATION_WEBHOOK_URL" \
160+
-H "Content-Type: application/json" \
161+
-d "$MESSAGE"

0 commit comments

Comments
 (0)