This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
Merge pull request #488 from XaverianTeamRobotics/dependabot/gradle/T… #383
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- name: set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew assembleDebug --stacktrace --no-daemon -x test | |
- name: Upload APK | |
uses: actions/upload-artifact@v1 | |
with: | |
name: apk | |
path: TeamCode/build/outputs/apk/debug/TeamCode-debug.apk | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- uses: actions/download-artifact@v3 | |
name: Create local changes | |
with: | |
name: apk | |
path: HelpPage/apk/bin | |
- name: Display structure of downloaded files | |
run: ls -laR HelpPage/apk/bin | |
- name: Commit files | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add -f ./HelpPage/apk/bin/* | |
git commit -m "Update the help page APK binary" ./HelpPage/apk/bin/* | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |