FoldCraftLauncher/.github/workflows/main.yml

55 lines
1.2 KiB
YAML
Raw Normal View History

2024-01-07 10:10:44 +00:00
name: Android CI
on:
pull_request:
branches-ignore:
- ''
push:
2024-01-16 10:02:33 +00:00
tags:
- 'v*'
2024-01-07 10:10:44 +00:00
branches-ignore:
- ''
workflow_dispatch:
jobs:
build:
2024-02-03 03:18:48 +00:00
if: github.repository_owner == 'FCL-Team'
2024-01-16 05:53:43 +00:00
strategy:
matrix:
arch: [ "all", "arm", "arm64", "x86", "x64" ]
fail-fast: false
2024-01-14 01:22:55 +00:00
env:
FCL_KEYSTORE_PASSWORD: ${{ secrets.FCL_KEYSTORE_PASSWORD }}
2024-01-16 05:53:43 +00:00
name: Build for ${{matrix.arch}}
2024-01-07 10:10:44 +00:00
runs-on: ubuntu-20.04
steps:
2024-01-16 05:53:43 +00:00
- uses: actions/checkout@v2
with:
fetch-depth: 0
2024-01-07 10:10:44 +00:00
2024-01-16 05:53:43 +00:00
- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
2024-01-07 10:10:44 +00:00
2024-01-16 10:02:33 +00:00
- name: Build ${{matrix.arch}} .apk
2024-01-16 05:53:43 +00:00
run: |
chmod +x gradlew
2024-01-16 10:02:33 +00:00
./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
2024-01-16 05:53:43 +00:00
- name: upload apk
2024-01-16 10:02:33 +00:00
if: startsWith(github.ref, 'refs/heads/')
2024-01-16 05:53:43 +00:00
uses: actions/upload-artifact@v3
with:
2024-01-16 10:02:33 +00:00
name: app-${{matrix.arch}}
path: FCL/build/outputs/apk/release/*
2024-01-16 05:53:43 +00:00
# retention-days: 1