mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-04-29 06:49:52 +00:00
Update android.yml
This commit is contained in:
parent
cb41cac73b
commit
c3ba56af73
1 changed files with 47 additions and 23 deletions
70
.github/workflows/android.yml
vendored
70
.github/workflows/android.yml
vendored
|
|
@ -1,14 +1,16 @@
|
|||
name: Build and Upload Release
|
||||
name: Android Release Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_tag:
|
||||
description: 'Release Tag'
|
||||
description: 'Release tag for the new version'
|
||||
required: true
|
||||
default: 'v2.9.3'
|
||||
release_notes:
|
||||
description: 'Release Notes'
|
||||
description: 'Release notes for the new version'
|
||||
required: true
|
||||
default: 'Initial release'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -17,18 +19,34 @@ jobs:
|
|||
- name: Check out the repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Ensure gradlew is executable
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '17'
|
||||
|
||||
- name: Build Android app in release mode
|
||||
run: bash ./gradlew assembleRelease
|
||||
- name: Chmod gradlew
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
- name: Build Android app in release mode
|
||||
run: ./gradlew assembleRelease
|
||||
|
||||
- name: Upload APK
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: app-release.apk
|
||||
path: app/build/outputs/apk/release/app-release.apk
|
||||
|
||||
- name: Download vectras-vm-arm64-v8a.tar.gz
|
||||
run: wget -O vectras-vm-arm64-v8a.tar.gz https://github.com/xoureldeen/Vectras-VM-Android/releases/download/v2.9.2/vectras-vm-arm64-v8a.tar.gz
|
||||
|
||||
- name: Download vectras-vm-x86_64.tar.gz
|
||||
run: wget -O vectras-vm-x86_64.tar.gz https://github.com/xoureldeen/Vectras-VM-Android/releases/download/v2.9.2/vectras-vm-x86_64.tar.gz
|
||||
|
||||
release:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
|
|
@ -41,21 +59,27 @@ jobs:
|
|||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload APK
|
||||
uses: actions/upload-artifact@v2
|
||||
- name: Upload APK to release
|
||||
uses: actions/upload-release-asset@v1
|
||||
with:
|
||||
name: android-release-apk
|
||||
path: app/build/outputs/apk/release/app-release.apk # Update this path if necessary
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: app/build/outputs/apk/release/app-release.apk
|
||||
asset_name: app-release.apk
|
||||
asset_content_type: application/vnd.android.package-archive
|
||||
|
||||
- name: Download additional files
|
||||
run: |
|
||||
wget https://github.com/xoureldeen/Vectras-VM-Android/releases/download/${{ github.event.inputs.release_tag }}/vectras-vm-arm64-v8a.tar.gz
|
||||
wget https://github.com/xoureldeen/Vectras-VM-Android/releases/download/${{ github.event.inputs.release_tag }}/vectras-vm-x86_64.tar.gz
|
||||
|
||||
- name: Upload additional files
|
||||
uses: actions/upload-artifact@v2
|
||||
- name: Upload vectras-vm-arm64-v8a.tar.gz to release
|
||||
uses: actions/upload-release-asset@v1
|
||||
with:
|
||||
name: vectras-vm-files
|
||||
path: |
|
||||
vectras-vm-arm64-v8a.tar.gz
|
||||
vectras-vm-x86_64.tar.gz
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: vectras-vm-arm64-v8a.tar.gz
|
||||
asset_name: vectras-vm-arm64-v8a.tar.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
- name: Upload vectras-vm-x86_64.tar.gz to release
|
||||
uses: actions/upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: vectras-vm-x86_64.tar.gz
|
||||
asset_name: vectras-vm-x86_64.tar.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue