diff --git a/.github/actions/build_android/action.yml b/.github/actions/build_android/action.yml new file mode 100644 index 0000000..6571884 --- /dev/null +++ b/.github/actions/build_android/action.yml @@ -0,0 +1,40 @@ +name: 'Build Android App' +description: 'Builds the Android app using Fastlane' + +runs: + using: 'composite' + + steps: + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.7' + + - name: Install Fastlane + run: gem install fastlane + shell: bash + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + + - name: Build Android Library with Fastlane + run: cd android && fastlane android local + shell: bash + + - name: Copy Android Library to Shared Directory + run: mkdir -p ${{ github.workspace }}/artifacts/android && cp ./artifacts/app-production-debug.apk ${{ github.workspace }}/artifacts/android/app-production-debug.apk + shell: bash + + - name: Upload apk to artifact + uses: actions/upload-artifact@v4 + with: + name: android + path: ${{ github.workspace }}/artifacts/android/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..524e5ad --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: "Test" + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Build Android apk + uses: ./.github/actions/build_android