FoldCraftLauncher/.github/workflows/main.yml

54 lines
1.2 KiB
YAML

name: Android CI
on:
pull_request:
branches-ignore:
- ''
push:
tags:
- 'v*'
branches-ignore:
- ''
workflow_dispatch:
jobs:
build:
strategy:
matrix:
arch: [ "all", "arm", "arm64", "x86", "x64" ]
fail-fast: false
env:
FCL_KEYSTORE_PASSWORD: ${{ secrets.FCL_KEYSTORE_PASSWORD }}
name: Build for ${{matrix.arch}}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build ${{matrix.arch}} .apk
run: |
chmod +x gradlew
./gradlew assemblerelease -Darch=${{matrix.arch}}
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
token: "${{ secrets.TOKEN }}"
files: |
FCL/build/outputs/apk/release/*.apk
- name: upload apk
if: startsWith(github.ref, 'refs/heads/')
uses: actions/upload-artifact@v3
with:
name: app-${{matrix.arch}}
path: FCL/build/outputs/apk/release/*
# retention-days: 1