added read me #140
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 app | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-Ace-Code: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: sudo npm install --save-dev webpack webpack-cli | |
- run: sudo npm install --save-dev @babel/core @babel/cli @babel/preset-env | |
- run: cd www && mkdir dist && cd .. | |
- run: npm run build | |
- run: npm run babelit | |
- run: ls | |
- run: sudo npm install -g [email protected] | |
- run: sudo cordova platform add android | |
- run: ls | |
- run: | | |
sudo cordova plugin add cordova-plugin-file | |
sudo cordova plugin add cordova-plugin-background-mode-fixed | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 11 | |
- uses: gradle/[email protected] | |
- name: Setup sdk | |
uses: android-actions/setup-android@v2 | |
- run: sh clean.sh | |
- run: | | |
cd platforms | |
sudo cordova build android | |
ls -a | |
ls -lh android/app/build/outputs/apk/debug/ | |
cd android/app/build/outputs/apk/debug/ | |
sudo mv app-debug.apk /home/runner/work/Ace-Code/Ace-Code | |
cd /home/runner/work/Ace-Code/Ace-Code | |
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keypass "kaguta256" -storepass "kaguta256" -keystore my-release-key.keystore app-debug.apk my-key-alias | |
zipalign -v 4 app-debug.apk app-debug.apk | |
jarsigner -verify -verbose app-debug.apk | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: upload_debug_apk | |
path: /home/runner/work/Ace-Code/Ace-Code/app-debug.apk | |
retention-days: 7 | |
- run: ls | |
release: | |
name: Release apk | |
needs: build-Ace-Code | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download apk from build | |
uses: actions/download-artifact@v1 | |
with: | |
name: upload_debug_apk | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TK }} | |
with: | |
tag_name: ${{ github.run_number }} | |
release_name: ${{ github.event.repository.name }} v5.0.7 #release | |
- name: upload Release Apk | |
id: upload_release_assets | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.TK }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: upload_debug_apk/app-debug.apk | |
asset_name: ${{ github.event.repository.name }}.apk | |
asset_content_type: application/zip |