test build in new repo #3
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: AZenith | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/workflows/build.yml" | |
| - ".github/scripts/**" | |
| - "jni/**" | |
| - "tweakfls/**" | |
| - "mainfiles/**" | |
| - "preloadbin/**" | |
| - "webui/**" | |
| - "thermalcore/**" | |
| - "azenithApplist.json" | |
| - "version" | |
| # Allow only one concurrent build workflows | |
| concurrency: | |
| group: build | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build Flashable Zip | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: add module verify | |
| id: verifyModule | |
| run: bash .github/scripts/verify.sh | |
| - name: NDK Setup | |
| uses: nttld/setup-ndk@v1.5.0 | |
| with: | |
| ndk-version: r29 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2.0.2 | |
| - name: Build AZenith JNI | |
| run: ndk-build | |
| - name: Building WebRoots | |
| working-directory: ./webui | |
| run: | | |
| bun install | |
| bun run build | |
| cp -r ./dist/* ../mainfiles/webroot | |
| - name: Compile Flashable Zip | |
| id: compileZip | |
| run: bash .github/scripts/compile_zip.sh | |
| - name: Upload To Telegram | |
| env: | |
| CHAT_ID: ${{ secrets.CHAT_ID }} | |
| BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | |
| COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
| COMMIT_URL: ${{ github.event.head_commit.url }} | |
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| TITLE: AZenith | |
| run: | | |
| if [ ! -z "${{ secrets.CHAT_ID }}" ] && [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then | |
| export VERSION=$(git rev-list --count HEAD) | |
| bash .github/scripts/telebot.sh ${{ steps.compileZip.outputs.zipName }} | |
| else | |
| echo "Telegram bot token or chatid is undefined, please add it to repository secrets!" | |
| exit 1 | |
| fi | |
| - name: Unzip AZenith Package | |
| run: | | |
| unzip ${{ steps.compileZip.outputs.zipName }} -d extracted | |
| - name: Upload Build Artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: ${{ steps.compileZip.outputs.artifactName }} | |
| path: extracted/** |