chore(#890): changes in script #1
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 Artifact Build | |
on: | |
push: | |
paths: | |
- '**' # Triggers the workflow on changes to any file in the repository | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
- name: Build Artifact | |
run: ./gradlew assembleRelease | |
- name: Replace Existing Artifact | |
run: | | |
mkdir -p ./artefacts/tuvali-android-artefact/ | |
cp ./app/build/outputs/aar/*.aar ./artefacts/tuvali-android-artefact/ | |
- name: Configure Git | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
- name: Commit Artifacts | |
run: | | |
git add ./artefacts/tuvali-android-artefact/ | |
git commit -m "Update Android Artifacts" -a || echo "No changes to commit" | |
- name: Push Changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
force: true | |
directory: . |