-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (59 loc) · 1.85 KB
/
release-android.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CD Android
on:
workflow_dispatch:
inputs:
build_name:
description: "A custom version name. The resulting name will have the format <cargo.version.patch>-<custom-name>-<rev> (E.g. 1.0.23-custom-name-2eb68d8c)."
required: false
type: string
push:
tags:
- "**"
branches:
- main
permissions:
id-token: write
contents: write
packages: write
env:
CARGO_TERM_COLOR: always
MACHINE: ubuntu-latest
jobs:
build:
runs-on: ubuntu-latest
env:
RUST_TOOLCHAIN: nightly-2024-07-30
RUST_COMPONENTS: "rust-std"
CUSTOM_BUILD_NAME: ${{ inputs.build_name }}
steps:
- uses: RDXWorks-actions/checkout@main
- name: Install Rust Toolchain for aarch64-linux-android
uses: RDXWorks-actions/toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: ${{ env.RUST_COMPONENTS }}
target: aarch64-linux-android
- name: Install Rust Toolchain for armv7-linux-androideabi
uses: RDXWorks-actions/toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: ${{ env.RUST_COMPONENTS }}
target: armv7-linux-androideabi
- name: Set up JDK 17
uses: RDXWorks-actions/setup-java@v3
with:
distribution: "adopt"
java-version: "17"
- name: Setup Android SDK
uses: RDXWorks-actions/setup-android@v2
- name: Install cargo-ndk
run: cargo install cargo-ndk
- name: Prune Tags
run: git fetch --prune --tags
- name: Build and publish Android
uses: RDXWorks-actions/gradle-build-action@main
with:
arguments: sargon-android:publishAndroidReleasePublicationToGitHubPackagesRepository
build-root-directory: jvm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}