Skip to content

Commit 8a2dce9

Browse files
authored
Merge pull request #291 from reown-com/fix/release-pipeline-automation
fix: fix release pipeline and automate GitHub release creation
2 parents b43c183 + 4aa283b commit 8a2dce9

File tree

6 files changed

+198
-225
lines changed

6 files changed

+198
-225
lines changed
Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,27 @@
1-
name: Create GitHub Release
1+
name: Create GitHub Release (Manual)
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'BOM version (e.g., 1.6.5)'
8+
required: true
9+
type: string
510

611
jobs:
712
create_release:
813
runs-on: ubuntu-latest
9-
1014
steps:
1115
- name: Checkout repository
1216
uses: actions/checkout@v6
13-
14-
- name: Generate Release Notes
15-
id: drafter
16-
uses: release-drafter/release-drafter@v6
1717
with:
18-
config-name: release-drafter.yml
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.PUSH_GITHUB_TOKEN }}
18+
ref: master
2119

2220
- name: Create GitHub Release
23-
uses: actions/create-release@v1
2421
env:
25-
GITHUB_TOKEN: ${{ secrets.PUSH_GITHUB_TOKEN }}
26-
with:
27-
tag_name: ${{ github.ref }}
28-
release_name: ${{ github.ref }}
29-
body: ${{ steps.drafter.outputs.changelog }}
30-
draft: false
31-
prerelease: false
32-
target_commitish: master
22+
GH_TOKEN: ${{ secrets.PUSH_GITHUB_TOKEN }}
23+
run: |
24+
gh release create "BOM_${{ inputs.version }}" \
25+
--target master \
26+
--title "BOM_${{ inputs.version }}" \
27+
--generate-notes

.github/workflows/ci_pay_integration_tests.yml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ on:
77
- develop
88
- master
99

10-
paths:
11-
- 'product/pay/**'
12-
- 'core/android/**'
13-
1410
permissions:
1511
contents: read
1612

@@ -27,30 +23,6 @@ jobs:
2723
runs-on: ubuntu-latest
2824
steps:
2925
- uses: actions/checkout@v6
30-
with:
31-
fetch-depth: 0
32-
33-
- name: Check what modules were changed
34-
id: what_modules_changed
35-
shell: bash
36-
run: |
37-
check_changes() {
38-
local module_path=$1
39-
local output_variable_name=$2
40-
41-
changes=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- "$module_path/")
42-
43-
if [ -n "$changes" ]; then
44-
echo "${output_variable_name}=true" >> $GITHUB_OUTPUT
45-
echo "${output_variable_name}=true"
46-
else
47-
echo "${output_variable_name}=false" >> $GITHUB_OUTPUT
48-
echo "${output_variable_name}=false"
49-
fi
50-
}
51-
52-
check_changes "product/pay" "PAY_MODULE_CHANGED"
53-
check_changes "core/android" "CORE_MODULE_CHANGED"
5426

5527
- name: Setup Required files to build SDKs
5628
with:
@@ -72,7 +44,6 @@ jobs:
7244
sudo udevadm trigger --name-match=kvm
7345
7446
- name: Run Pay instrumented tests
75-
if: ${{ steps.what_modules_changed.outputs.PAY_MODULE_CHANGED == 'true' || steps.what_modules_changed.outputs.CORE_MODULE_CHANGED == 'true' || github.event_name == 'workflow_dispatch' }}
7647
uses: ./.github/actions/ci_instrumented_tests
7748
with:
7849
name: "Pay_SDK"

.github/workflows/ci_release_artifacts.yml

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,48 @@ jobs:
8080
run: |
8181
./gradlew releaseAllSDKs -Ptype=sonatype
8282
83-
- name: Upload staging repositories to Central Portal and release
83+
- name: Close staging repositories
8484
env:
85-
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
86-
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
87-
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
85+
CENTRAL_PORTAL_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
86+
CENTRAL_PORTAL_PASSWORD: ${{ secrets.CENTRAL_PORTAL_PASSWORD }}
8887
REOWN_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.REOWN_SONATYPE_STAGING_PROFILE_ID }}
8988
WC_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.WC_SONATYPE_STAGING_PROFILE_ID }}
89+
run: |
90+
./gradlew closeReownStagingRepository closeWalletconnectStagingRepository
91+
92+
- name: Upload staging repositories to Central Portal and release
93+
env:
9094
CENTRAL_PORTAL_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
9195
CENTRAL_PORTAL_PASSWORD: ${{ secrets.CENTRAL_PORTAL_PASSWORD }}
92-
INTERNAL_MERCHANT_API: ${{ secrets.INTERNAL_MERCHANT_API }}
93-
POS_PROJECT_ID: ${{ secrets.POS_PROJECT_ID }}
96+
REOWN_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.REOWN_SONATYPE_STAGING_PROFILE_ID }}
97+
WC_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.WC_SONATYPE_STAGING_PROFILE_ID }}
98+
run: |
99+
./gradlew closeAndReleaseMultipleRepositories
100+
101+
- name: Extract BOM version
102+
id: version
103+
run: |
104+
VERSION=$(grep 'const val BOM_VERSION' buildSrc/src/main/kotlin/Versions.kt | sed 's/.*"\(.*\)".*/\1/')
105+
echo "bom_version=$VERSION" >> "$GITHUB_OUTPUT"
106+
echo "Extracted BOM version: $VERSION"
107+
108+
- name: Create git tag
109+
run: |
110+
git config user.name "github-actions[bot]"
111+
git config user.email "github-actions[bot]@users.noreply.github.com"
112+
TAG="BOM_${{ steps.version.outputs.bom_version }}"
113+
if git rev-parse "$TAG" >/dev/null 2>&1; then
114+
echo "Tag $TAG already exists, skipping tag creation"
115+
else
116+
git tag "$TAG"
117+
git push origin "$TAG"
118+
fi
119+
120+
- name: Create GitHub Release
121+
env:
122+
GH_TOKEN: ${{ secrets.PUSH_GITHUB_TOKEN }}
94123
run: |
95-
./gradlew closeAndReleaseMultipleRepositories
124+
gh release create "BOM_${{ steps.version.outputs.bom_version }}" \
125+
--target master \
126+
--title "BOM_${{ steps.version.outputs.bom_version }}" \
127+
--generate-notes

0 commit comments

Comments
 (0)