Skip to content

Commit

Permalink
WIP: Automated Android branch builds
Browse files Browse the repository at this point in the history
  • Loading branch information
complexspaces committed Sep 9, 2023
1 parent 71a58d0 commit ba8de84
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 5 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
pull_request:
branches:
- main
# types:
# - closed

name: Update Android Artifacts

permissions:
contents: write # read

jobs:
update-android-branch:
# if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"

- name: Package Android AAR
run: |
echo Running artifact update on branch ${{ github.ref_name }}
# git checkout -b main-with-maven
git status
git remote -vv
# git fetch --all
# git reset --hard origin/main
git status
git config --global user.name "Android Builder"
git config --global user.email "[email protected]"
./ci/package_android_release.sh
git show-ref
git remote -vv
git fetch --all
git add --force android-release-support/*
git commit -am "[Automated] Test packaging"
git status
git push -f origin HEAD:main-with-maven
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ on:
branches:
- main
- "*_dev"
pull_request:
merge_group:
schedule:
- cron: '0 18 * * *'
#pull_request:
# merge_group:
#schedule:
# - cron: '0 18 * * *'

name: CI
permissions:
Expand Down
4 changes: 3 additions & 1 deletion ci/package_android_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ artifact_path="../android/rustls-platform-verifier/build/outputs/aar/$artifact_n
git clean -dfX "./maven/"

cp ./pom-template.xml ./maven/pom.xml
sed -i "" "s/\$VERSION/$version/" ./maven/pom.xml
ls -al ./maven
ls -al .
sed -i "s/\$VERSION/$version/" ./maven/pom.xml

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

0 comments on commit ba8de84

Please sign in to comment.