chore(#891): Edited Git Actions for Swift Version #41
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 | |
permissions: | |
contents: write # Grants permission to push code and manage releases | |
pull-requests: write # Grants permission to write pull requests | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install npm dependencies | |
run: | | |
npm install -g yarn # Install yarn globally if you're using yarn | |
yarn install # or `npm install` if using npm | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Build Artifact | |
run: | | |
cd android | |
chmod +x ./gradlew | |
./gradlew assembleDebug | |
- name: Replace Existing Artifact | |
run: | | |
ls -la ./android/build/outputs/aar/ | |
mkdir -p ./artefacts/tuvali-android-artefact/ | |
cp ./android/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 . | |
git commit --allow-empty -m "chore(#890): changes in script" | |
- name: Push Changes to Specific Branch | |
run: | | |
git push origin inji-Kotlin-ios-artefact | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |