Skip to content

Commit 4d5fe2d

Browse files
committed
CI Builds
* Test CI Builds
1 parent 3137c00 commit 4d5fe2d

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.github/workflows/build.yml

+28
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,38 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v4
10+
1011
- name: Setup Java 17
1112
uses: actions/setup-java@v4
1213
with:
1314
distribution: 'zulu'
1415
java-version: '17'
16+
17+
- name: Set BUILD_TAG
18+
run: echo "BUILD_TAG=.ci" >> $GITHUB_ENV
19+
20+
- name: Decode Keystore
21+
env:
22+
KEYSTORE: ${{ secrets.KEYSTORE }}
23+
run: echo $KEYSTORE | base64 --decode > ./app/ci.ks
24+
25+
- name: Decode Properties
26+
env:
27+
PROPERTIES: ${{ secrets.PROPERTIES }}
28+
run: echo $PROPERTIES | base64 --decode > local.properties
29+
1530
- name: Build with Gradle
1631
run: ./gradlew build
32+
33+
- name: Get current branch name
34+
run: echo "BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
35+
36+
- name: Create Release
37+
uses: softprops/action-gh-release@v2
38+
if: ${{ env.BRANCH }} == "3.x"
39+
with:
40+
tag_name: ci${{ github.run_number }}
41+
name: CI-Release-${{ env.BRANCH }}-${{ github.run_number }}
42+
files: ./app/build/outputs/apk/release/com.apkupdater.ci-release.apk
43+
body: ${{ github.event.head_commit.message }}
44+
prerelease: true

app/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ android {
1212
compileSdk = 34
1313

1414
defaultConfig {
15-
applicationId = "com.apkupdater"
15+
applicationId = "com.apkupdater" + System.getenv("BUILD_TAG").orEmpty()
1616
minSdk = 21
1717
targetSdk = 34
1818
versionCode = 52

0 commit comments

Comments
 (0)