Skip to content

Commit

Permalink
Merge pull request #902 from kienvo/fix-pipeline
Browse files Browse the repository at this point in the history
Fix deployment pipeline to apk branch
  • Loading branch information
mariobehling authored May 10, 2024
2 parents 340a42c + 1550c74 commit bb06ae1
Showing 1 changed file with 50 additions and 2 deletions.
52 changes: 50 additions & 2 deletions .github/workflows/branch-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,56 @@ jobs:
- name: Syntax Check
run: ./gradlew spotlessCheck
- name: Build with Gradle
run: ./gradlew build --stacktrace

run: ./gradlew build --no-daemon --stacktrace
- name: Build app bundle release
run: ./gradlew bundleRelease

- name: Upload APK Debug
uses: actions/upload-artifact@v4
with:
name: APK Debug generated
path: android/build/outputs/apk/debug

- name: Upload APK Release
uses: actions/upload-artifact@v4
with:
name: APK Release generated
path: android/build/outputs/apk/release

- name: Upload AAB Release
uses: actions/upload-artifact@v4
with:
name: AAB Release generated
path: android/build/outputs/bundle/release

- name: Upload APK to apk branch
run: |
git config --global user.name "${{ github.workflow }}"
git config --global user.email "gh-actions@${{ github.repository_owner }}"
git clone --branch=apk https://${{ github.repository_owner }}:${{ github.token }}@github.com/${{ github.repository }} apk
cd apk
if [[ ${{ github.ref_name }} =~ ^(master)$ ]]; then
rm -rf *
else
rm -rf badge-magic-dev*
fi
ls
find ../android/build/outputs -type f \( -name '*.apk' -o -name '*.aab' \) -exec cp -v {} . \;
for file in android*; do
mv $file badge-magic-development-${file#*-}
done
git checkout --orphan temporary
git add --all .
git commit -am "[Auto] Update Test Apk ($(date +%Y-%m-%d.%H:%M:%S))"
git branch -D apk
git branch -m apk
git push --force origin apk
build-ios:
runs-on: macos-latest
name: iOS Build
Expand Down

0 comments on commit bb06ae1

Please sign in to comment.