-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (48 loc) · 1.57 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "adopt"
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Setup Android NDK
run: yes | sdkmanager "ndk;21.0.6113669" >/dev/null
- name: Set default rust toolchain
run: rustup default 1.61.0
- name: Install rustfmt
run: rustup component add rustfmt
- name: Install clippy
run: rustup component add clippy
- name: Add armv7 target
run: rustup target add armv7-linux-androideabi
- name: Add aarch64 target
run: rustup target add aarch64-linux-android
- name: Add i686 target
run: rustup target add i686-linux-android
- name: Add x86_64 target
run: rustup target add x86_64-linux-android
- name: Lint code format
run: cargo fmt --all -- --check
- name: Lint code
run: cargo clippy --all -- -D warnings
- name: Build aar
run: ./gradlew assembleRelease && ./gradlew assembleRelease
- name: Upload build artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/outputs/aar/stremio-core-kotlin-release.aar
asset_name: stremio-core-kotlin.aar
tag: ${{ github.ref }}
overwrite: true