License convert to Apache License 2.0 #173
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: Build Encore Zip | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/build.yml' | |
- '.github/scripts/**' | |
- 'src/**' | |
- 'module/**' | |
- 'webui/**' | |
- 'gamelist.txt' | |
- 'version' | |
jobs: | |
build: | |
name: Build Flashable Zip | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: NDK Setup | |
uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r27b | |
- name: Build Encore JNI | |
working-directory: ./src | |
run: ndk-build | |
- name: Build WebUI | |
working-directory: ./src/webui | |
run: | | |
npm install | |
npm run tailwind | |
npm run build | |
cp ./dist/* ../../module/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: Encore Tweaks | |
run: | | |
if [ ! -z "${{ secrets.CHAT_ID }}" ] && [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then | |
export VERSION=$(git rev-list --count HEAD) | |
bash .github/scripts/telegram_bot.sh $GITHUB_WORKSPACE/${{ steps.compileZip.outputs.zipName }} | |
else | |
echo "Telegram bot token or chatid is undefined, please add it to repository secrets!" | |
exit 1 | |
fi |