mirror of
https://github.com/arkorty/ACEquity-wma.git
synced 2026-03-17 16:51:41 +00:00
init
This commit is contained in:
84
.github/workflows/build-release-android.yml
vendored
Normal file
84
.github/workflows/build-release-android.yml
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
name: Build and Release Android APK
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version tag (e.g., v0.0.2)'
|
||||
required: true
|
||||
default: 'v0.0.2'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Make gradlew executable
|
||||
run: chmod +x android/gradlew
|
||||
|
||||
- name: Build release APK
|
||||
run: bun run build:release
|
||||
|
||||
- name: Get version from package.json
|
||||
id: package-version
|
||||
run: |
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Rename APK
|
||||
run: |
|
||||
mv android/app/build/outputs/apk/release/app-release.apk \
|
||||
android/app/build/outputs/apk/release/ACEquity-v${{ steps.package-version.outputs.version }}.apk
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ github.event.inputs.version || github.ref_name }}
|
||||
name: Release ${{ github.event.inputs.version || github.ref_name }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
files: |
|
||||
android/app/build/outputs/apk/release/ACEquity-v${{ steps.package-version.outputs.version }}.apk
|
||||
body: |
|
||||
## ACEquity v${{ steps.package-version.outputs.version }}
|
||||
|
||||
### Changes
|
||||
- Android release build
|
||||
|
||||
### Installation
|
||||
Download the APK file and install it on your Android device.
|
||||
|
||||
**Note:** You may need to enable "Install from unknown sources" in your device settings.
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user