feat: setup android sdk, ndk and java in workflow #1
Workflow file for this run
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 TizenBrew Device Manager | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
publish-tauri: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: 'macos-latest' | |
args: '--target aarch64-apple-darwin' | |
- platform: 'macos-latest' | |
args: '--target x86_64-apple-darwin' | |
- platform: 'ubuntu-22.04' | |
args: '' | |
- platform: 'windows-latest' | |
args: '' | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set env | |
if: matrix.platform == 'ubuntu-22.04' | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
- name: install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-22.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: install frontend dependencies | |
run: npm install | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tagName: v__VERSION__ | |
releaseName: 'TizenBrew Device Manager v__VERSION__' | |
releaseDraft: true | |
prerelease: false | |
args: ${{ matrix.args }} | |
- name: Setup Java | |
if: matrix.platform == 'ubuntu-22.04' | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Android SDK | |
if: matrix.platform == 'ubuntu-22.04' | |
uses: android-actions/setup-android@v3 | |
- name: Install NDK | |
if: matrix.platform == 'ubuntu-22.04' | |
run: sdkmanager "ndk;27.0.11902837" | |
- name: Build for Android | |
if: matrix.platform == 'ubuntu-22.04' | |
run: npm run tauri android build | |
- name: Push to release | |
if: matrix.platform == 'ubuntu-22.04' | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ env.RELEASE_VERSION }} | |
files: | | |
src-tauri/gen/android/app/build/outputs/apk/release/* |