Skip to content

Commit 9ea1c89

Browse files
authored
chore: update sdkVersionName to 1.1.14 (#74)
1 parent d8198ee commit 9ea1c89

File tree

2 files changed

+51
-5
lines changed

2 files changed

+51
-5
lines changed

.github/workflows/release-manual.yml

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Release (manual)
22
on:
3-
workflow_dispatch: {}
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'Version to release (e.g. 1.2.3). Leave empty to use build.gradle'
7+
required: false
8+
type: string
49

510
env:
611
SIGNING_KEY_FILE_PATH: /home/runner/secretKey.gpg
@@ -27,10 +32,14 @@ jobs:
2732
needs: [lint, test, build]
2833
runs-on: ubuntu-latest
2934
permissions:
30-
contents: read
35+
contents: write
3136
steps:
3237
- name: Checkout Repository
3338
uses: actions/checkout@v4
39+
with:
40+
fetch-depth: '0'
41+
persist-credentials: true
42+
token: ${{ secrets.GITHUB_TOKEN }}
3443

3544
- name: Set up JDK 17
3645
uses: actions/setup-java@v4
@@ -44,6 +53,19 @@ jobs:
4453
signing_key_file: ${{ secrets.SIGNING_KEY_FILE }}
4554
signing_file_path: ${{ env.SIGNING_KEY_FILE_PATH }}
4655

56+
- name: Optionally set version in Gradle
57+
if: ${{ inputs.version != '' }}
58+
run: ./gradlew -PversionParam="${{ inputs.version }}" changeReleaseVersion
59+
60+
- name: Determine version
61+
run: |
62+
if [ -n "${{ inputs.version }}" ]; then
63+
echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
64+
else
65+
VERSION=$(grep -o '"sdkVersionName"\s*:\s*"[^"]*"' build.gradle | grep -o '"[^\"]*"$' | tr -d '"')
66+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
67+
fi
68+
4769
- name: Set snapshot environment variable
4870
run: echo "USE_SNAPSHOT=false" >> $GITHUB_ENV
4971

@@ -61,9 +83,33 @@ jobs:
6183
echo "Running direct deployment script..."
6284
bash -e ./deploy-to-maven-central.sh --no-auto-publish
6385
86+
- name: Configure Git user
87+
run: |
88+
git config user.name "github-actions[bot]"
89+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
90+
91+
- name: Create and push tag
92+
run: |
93+
git fetch --tags --force
94+
if git rev-parse "v${VERSION}" >/dev/null 2>&1; then
95+
echo "Tag v${VERSION} already exists; skipping tag creation"
96+
else
97+
git tag "v${VERSION}"
98+
git push origin "v${VERSION}"
99+
fi
100+
101+
- name: Create GitHub Release
102+
uses: softprops/action-gh-release@v2
103+
with:
104+
tag_name: "v${{ env.VERSION }}"
105+
name: "v${{ env.VERSION }}"
106+
generate_release_notes: true
107+
env:
108+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109+
64110
- name: Cleanup signing key files
65111
if: always()
112+
shell: bash
66113
run: |
67114
shred -u -z -n 3 "${SIGNING_KEY_FILE_PATH}" || rm -f "${SIGNING_KEY_FILE_PATH}"
68-
rm -f ~/secretKey.gpg.b64 || true
69-
shell: bash
115+
rm -f ~/secretKey.gpg.b64 || true

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import org.jmailen.gradle.kotlinter.tasks.FormatTask
1212

1313
buildscript {
1414
ext.modules = [
15-
"sdkVersionName" : "1.1.13",
15+
"sdkVersionName" : "1.1.14",
1616
"androidMinSdkVersion": 23,
1717
"androidTargetVersion": 34
1818
]

0 commit comments

Comments
 (0)