Merge pull request #17 from Mohin2295747/patch-3 #31
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| paths-ignore: | |
| - "**.md" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| actions: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Load Google Services File | |
| env: | |
| DATA: ${{ secrets.HA1_GOOGLE_SERVICES_JSON_BASE64 }} | |
| run: echo $DATA | base64 -di > app/google-services.json | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build and sign APK with Gradle | |
| run: ./gradlew assembleRelease | |
| env: | |
| HA1_KEYSTORE_PASSWORD: ${{ secrets.HA1_KEYSTORE_PASSWORD }} | |
| HA1_GITHUB_TOKEN: ${{ secrets.HA1_GITHUB_TOKEN }} | |
| HA1_VERSION_SOURCE: 'ci' | |
| - name: Upload Artifacts(arm32) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: app/build/outputs/apk/release/Han1meViewer-v*_armeabi-v7a.apk | |
| name: Han1meViewer-ci-${{ github.sha }}-armeabi-v7a | |
| - name: Upload Artifacts(arm64) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: app/build/outputs/apk/release/Han1meViewer-v*_arm64-v8a.apk | |
| name: Han1meViewer-ci-${{ github.sha }}-arm64-v8a | |
| - name: Upload Artifacts(universal) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: app/build/outputs/apk/release/Han1meViewer-v*_universal.apk | |
| name: Han1meViewer-ci-${{ github.sha }}-universal |