forked from BlueWallet/BlueWallet
-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (52 loc) · 1.93 KB
/
build-release-apk.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
name: BuildReleaseApk
on: [push, pull_request]
jobs:
buildReleaseApk:
runs-on: macos-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: Specify node version
uses: actions/setup-node@v4
with:
node-version: 18
- name: Use npm caches
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Use specific Java version for sdkmanager to work
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'gradle'
- name: Install node_modules
run: npm install --production
- name: Extract Version Name
id: version_name
run: |
VERSION_NAME=$(grep versionName android/app/build.gradle | awk '{print $2}' | tr -d '"')
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
echo "::set-output name=version_name::$VERSION_NAME"
- name: Generate Build Number based on timestamp
run: |
NEW_BUILD_NUMBER=$(date +%s)
echo "NEW_BUILD_NUMBER=$NEW_BUILD_NUMBER" >> $GITHUB_ENV
echo "::set-output name=build_number::$NEW_BUILD_NUMBER"
- name: Build
env:
KEYSTORE_FILE_BASE64: ${{ secrets.KEYSTORE_FILE_BASE64 }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
BUILD_NUMBER: ${{ env.NEW_BUILD_NUMBER }}
run: ./scripts/build-release-apk.sh
- uses: actions/upload-artifact@v4
if: success()
with:
name: BlueWallet-${{ env.VERSION_NAME }}(${{ env.NEW_BUILD_NUMBER }}).apk
path: ./android/app/build/outputs/apk/release/BlueWallet-${{ env.VERSION_NAME }}(${{ env.NEW_BUILD_NUMBER }}).apk