Skip to content

Commit 7c9586f

Browse files
committed
WIP: Automated Android branch builds
1 parent 71a58d0 commit 7c9586f

File tree

3 files changed

+48
-5
lines changed

3 files changed

+48
-5
lines changed

.github/workflows/android_builds.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- main
5+
# types:
6+
# - closed
7+
8+
name: Update Android Artifacts
9+
10+
permissions:
11+
contents: write # read
12+
13+
jobs:
14+
update-android-branch:
15+
# if: github.event.pull_request.merged == true
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up JDK
20+
uses: actions/setup-java@v3
21+
with:
22+
java-version: "17"
23+
distribution: "temurin"
24+
25+
- name: Configure Git
26+
run: |
27+
git config --global user.name "Android Builder"
28+
git config --global user.email "[email protected]"
29+
git fetch --all
30+
31+
- name: Package Android AAR
32+
run: |
33+
echo Running artifact update on branch ${{ github.ref_name }}
34+
# git checkout -b main-with-maven
35+
# git reset --hard origin/main
36+
37+
./ci/package_android_release.sh
38+
39+
git add --force android-release-support/*
40+
git commit -am "[Automated] Test packaging"
41+
git push -f origin HEAD:main-with-maven

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ on:
33
branches:
44
- main
55
- "*_dev"
6-
pull_request:
7-
merge_group:
8-
schedule:
9-
- cron: '0 18 * * *'
6+
#pull_request:
7+
# merge_group:
8+
#schedule:
9+
# - cron: '0 18 * * *'
1010

1111
name: CI
1212
permissions:

ci/package_android_release.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ artifact_path="../android/rustls-platform-verifier/build/outputs/aar/$artifact_n
3333
git clean -dfX "./maven/"
3434

3535
cp ./pom-template.xml ./maven/pom.xml
36-
sed -i "" "s/\$VERSION/$version/" ./maven/pom.xml
36+
ls -al ./maven
37+
ls -al .
38+
sed -i "s/\$VERSION/$version/" ./maven/pom.xml
3739

3840
mvn install:install-file -Dfile="$artifact_path" -Dpackaging="aar" -DpomFile="./maven/pom.xml" -DlocalRepositoryPath="./maven/"

0 commit comments

Comments
 (0)