Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JUST-INTJ authored Oct 6, 2024
1 parent 13a38d8 commit 4b26fb3
Showing 1 changed file with 25 additions and 27 deletions.
52 changes: 25 additions & 27 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
name: Nix
name: Android CI

on:
pull_request:
push:
branches: [master]
workflow_dispatch: # 允许手动触发

jobs:
develop:
strategy:
matrix:
os:
- ubuntu-24.04
- macos-14
runs-on: ${{ matrix.os }}
build:
runs-on: ubuntu-latest

steps:
- name: Fetch source code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: cachix/install-nix-action@v29
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v15
with:
name: fcitx5-android
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build Release APK
run: |
nix develop .#noAS --command ./gradlew :app:assembleRelease
nix develop .#noAS --command ./gradlew :assembleReleasePlugins
- uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew assembleDebug

- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-debug
path: app/build/outputs/apk/debug/app-debug.apk

0 comments on commit 4b26fb3

Please sign in to comment.