-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (60 loc) · 2.24 KB
/
Copy pathbuild.yml
File metadata and controls
65 lines (60 loc) · 2.24 KB
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
name: Build
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
branches:
- '**'
jobs:
build:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up JDK
uses: actions/setup-java@main
with:
java-version: 25
distribution: temurin
- name: Set-up NDK
run: |
yes | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses
./gradlew --warning-mode 'all' --no-daemon clean
- name: Install android-gcc-cross
run: |
declare -r PINO_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/android-gcc-cross/releases/latest')")"
declare -r PINO_TARBALL='/tmp/toolchain.tar.xz'
declare -r PINO_URL="https://github.com/AmanoTeam/android-gcc-cross/releases/download/${PINO_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${PINO_URL}" --output "${PINO_TARBALL}"
tar --directory="$(dirname "${PINO_TARBALL}")" --extract --file="${PINO_TARBALL}"
echo '/tmp/android-gcc-cross/bin' >> "${GITHUB_PATH}"
echo 'PINO_OPT_LEVEL=fast' >> "${GITHUB_ENV}"
- name: Patch the NDK
run: |
ndk-patch
- name: Run update.sh
run: |
bash tools/update.sh
- name: Build Android project
env:
PINO_LTO: full
run: |
./gradlew --warning-mode 'all' --no-daemon 'assembleRelease'
- name: Upload artifact
uses: actions/upload-artifact@main
with:
path: ./app/build/outputs/apk/release/app-release-unsigned.apk
- name: Create release
uses: softprops/action-gh-release@master
with:
tag_name: '${{ env.APP_VERSION }}'
name: 'Just Delete Me v${{ env.APP_VERSION }}'
files: ./app/build/outputs/apk/release/app-release-unsigned.apk
draft: false
prerelease: false
fail_on_unmatched_files: true
body: "* Update entries"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}